bugGNUstep - Bugs: bug #53994, Can't set a value on keypath using...

Group
 
 

bug #53994: Can't set a value on keypath using NSValue containing a size

Submitter:  Ivan Vučica <ivucica>
Submitted:  Sun 27 May 2018 05:49:56 PM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Bug
Status:  Works For Me Privacy:  Public
Assigned to:  FredKiefer Open/Closed:  Declined
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Thu 28 Jun 2018 09:14:16 PM UTC, comment #2: 

I think this bug was already fixed when you filed the bug report. Still it would be great to have the test code from your github branch in base.

Fred Kiefer <FredKiefer>
Group Member
Sun 27 May 2018 05:50:59 PM UTC, comment #1: 
Ivan Vučica <ivucica>
Group Member
Sun 27 May 2018 05:49:56 PM UTC, original submission:  

```objective-c
#import <Foundation/Foundation.h>

@interface A : NSObject
{
  NSSize _s;
}
@end
@implementation A
- (NSSize) s {
  return self->_s;
}
- (void) setS: (NSSize) s {
  self->_s = s;
}
@end
int main() {
  NSSize in = NSMakeSize(1.0, 2.0);
  NSValue * v = [NSValue valueWithSize: in];
  /*
  originally observed with:
  NSValue * v = [NSValue valueWithBytes: &in
                               objCType: @encode(NSSize)];
  */
  A * a = [A new];
  [a setValue: v
       forKey: @"s"];

  return 0; 
}
```

Output:

```
$ clang `gnustep-config --objc-flags` `gnustep-config --objc-libs` `gnustep-config --base-libs` repro.m -o repro && ./repro
clang: warning: argument unused during compilation: '-fobjc-nonfragile-abi'
clang: warning: argument unused during compilation: '-fobjc-nonfragile-abi'
2018-05-27 18:45:53.501 repro[14679:14679] match! point is {_NSPoint=dd}, type is {_NSSize=dd}
./repro: Uncaught exception NSInvalidArgumentException, reason: [GSSizeValue-pointValue] should be overridden by subclass
Aborted
```

Ivan Vučica <ivucica>
Group Member

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

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

    Votes

    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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

    History

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-28 FredKiefer StatusNone Works For Me
        Assigned toNone FredKiefer
        Open/ClosedOpen Declined

    Back to the top

    Powered by Savane 3.16-1e6f.
    Corresponding source code