Xcode-6.3 (6D1002): [Swift 1.2] Incorrect type mismatch calling XCTAssert
| Originator: | segiddins | ||
| Number: | rdar://20788378 | Date Originated: | 01-May-2015 05:51 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode-6.3 (6D1002) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: The compiler gives an erroneous “Cannot invoke ‘XCTAssert’ with an argument list of the ‘(Bool)’” Steps to Reproduce: 1) git clone https://github.com/segiddins/realm-cocoa —branch=seg-xctassert-type-mismatch —depth=1 2) sh build.sh test-ios-swift Expected Results: The tests should compile, and likely pass Actual Results: error: cannot invoke 'XCTAssert' with an argument list of type '(Bool)' Notes: Prompted by https://twitter.com/jckarter/status/594298674575847424
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!
Changing the error lines to: XCTAssert(oldObject?["array"]?.firstObject is MigrationObject?) XCTAssert(newObject?["array"]?.firstObject is MigrationObject?)
fixes the error, so it's really just a bad error message from the typechecker