Swift constant NSPoint bad error message
| Originator: | keithbsmiley | ||
| Number: | rdar://19956856 | Date Originated: | 25-Feb-2015 12:10 PM |
| Status: | Open | Resolved: | |
| Product: | OS X SDK | Product Version: | 10.10.2 |
| Classification: | Other Bug | Reproducible: | Always |
Summary: When using a `let` with an NSPoint and then trying to alter a value on the point, the error message reads "Binary operator '-=' cannot be applied to two CGFloat operands" which isn't descriptive of the actual issue. Steps to Reproduce: let originPoint: NSPoint = NSWindow().frame.origin originPoint.y -= originFrame.height Expected Results: The error should mention something about how constant points cannot be changed. Actual Results: The error reads "Binary operator '-=' cannot be applied to two CGFloat operands" Notes: See the attached playground
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
https://github.com/Keithbsmiley/radars/tree/master/NSWindowSwiftError