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

Vincent Woo <[email protected]>
Newsgroups gmane.comp.lib.gnustep.bugs
Message-ID <[email protected]>
URL:
  <http://savannah.gnu.org/bugs/?53267>

                 Summary: Parameterized NSMutableArray doesn't seem to work
correctly
                 Project: GNUstep
            Submitted by: akanet
            Submitted on: Fri 02 Mar 2018 12:50:32 PM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53267>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.