bugGNUstep - Bugs: bug #53267, Parameterized NSMutableArray...

Group
 
 

bug #53267: Parameterized NSMutableArray doesn't seem to work correctly

Submitter:  Vincent Woo <akanet>
Submitted:  Fri 02 Mar 2018 12:50:32 PM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Item Group:  Bug Status:  Invalid
Privacy:  Public Assigned to:  FredKiefer
Open/Closed:  Declined
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 18 Mar 2018 04:25:46 PM UTC, comment #1: 

Sorry to take so long to reply to this. I was sure I already declined this but I seem to have forgotten to do so.

The issue you are seeing is with the compiler that the user is compiling the source code with. This is neither related to GNUstep nor to libobjc2. You should forward this error message either to clang or gcc, which ever compiler the user is running.

As far as I am aware gcc does not support generics for Objective-C, so most likely this is about clang.

Fred Kiefer <FredKiefer>
Group Member
Fri 02 Mar 2018 12:50:32 PM UTC, original submission:  

A user submitted the following code:

    NSMutableArray<NSNumber *> *arr = [NSMutableArray array];
    [arr addObject:@1];
    NSLog(@"%ld", arr[0].integerValue);

which seems to cause the error

    solution.m:9:26: error: property 'integerValue' not found on object of type 'id'
    NSLog(@"%ld", arr[0].integerValue);

This appears to work in the reference Apple implementation.

Vincent Woo <akanet>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by akanet (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-18 FredKiefer Open/ClosedOpen Declined
    2018-03-18 FredKiefer CategoryNone Libraries
        Item GroupNone Bug
        StatusNone Invalid
        Assigned toNone FredKiefer

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code