Compiler bug: XCTAssertEqualObjects plus NSArray literal
Originator: | hamish | ||
Number: | rdar://38299852 | Date Originated: | March 9 2018, 1:21 PM |
Status: | Open | Resolved: | |
Product: | Xcode | Product Version: | 9.2 (9C40b) |
Classification: | Serious Bug | Reproducible: | Always |
Summary: Passing `NSArray` literal inside `XCTAssertEqualObjects` causes compile error, whereas passing stack variable from same literal does not. Steps to Reproduce: Open enclosed Xcode project Expected Results: ``` XCTAssertEqualObjects(array, [self methodTakingArray:@[ @"hello", @"world" ]]); ``` should compile the same as: ``` NSArray *array = @[ @"hello", @"world" ]; XCTAssertEqualObjects(array, [self methodTakingArray:array]); ``` Actual Results: The former succeeds where the latter fails. Version/Build: Xcode 9.2 (9C40b) Configuration: macOS 10.13.3
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!