Closed swift-ci closed 8 years ago
Assertion failed: (TypeVariables[impl.getGraphIndex()] == typeVar && "Type variable mismatch"), function lookupNode, file /Volumes/Data/swift-public/swift/lib/Sema/ConstraintGraph.cpp, line 52.
Stack dump:
0. Program arguments: /Volumes/Data/swift-public/build/ninja/swift-macosx-x86_64/bin/swift -frontend -interpret - -target x86_64-apple-macosx10.9 -enable-objc-interop -sdk /Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -color-diagnostics -module-name main
1. While type-checking expression at [<stdin>:2:1 - line:12:9] RangeText="MKDirections(request: MKDirectionsRequest()).calculate { (response, error) in
guard let response = response else {
return
}
response.routes.forEach({ (route) in
print("\(route.distance)\n")
})
print("Selected route distance: \(response.routes.minElement{ $0 < $1 }!.distance)")
}"
2. While type-checking expression at [<stdin>:11:13 - line:11:96] RangeText="print("Selected route distance: \(response.routes.minElement{ $0 < $1 }!.distance)")"
3. While type-checking expression at [<stdin>:11:18 - line:11:96] RangeText="("Selected route distance: \(response.routes.minElement{ $0 < $1 }!.distance)")"
Taking the interpolated expression out of the string results in this error, which hopefully gets you unblocked:
<stdin>:11:48: error: binary operator '<' cannot be applied to two 'MKRoute' operands
_ = response.routes.minElement{ $0 < $1 }!.distance
~~ ^ ~~
I'm looking into this now. I think I know what's going on.
Agafonov, can you verify that this is fixed, and then close out the bug if so, using one a future snapshot build?
Environment
xcrun swift -version \>\>\> Apple Swift version 3.0 (swiftlang-800.0.46.2 clang-800.0.38) \>\>\> Target: x86_64-apple-macosx10.9 XCode Version 8.0 (8A218a) MacBook Air 13, OS X El Capitan 10.11.6Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, CompilerCrash, TypeChecker | |Assignee | AGWorld (JIRA) | |Priority | Medium | md5: a658be66382c1ffba5504a7f270e9029Issue Description:
I creating the app using MapKit framework.
Sample code that don't compile:
Last print line can't recognized by swift compiler.