-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-1551] Compilation stuck instead of failing on misspelt property name #44160
Comments
Comment by Tadeas Kriz (JIRA) With latest snapshot (Apple Swift version 3.0-dev (LLVM dffa09ffd8, Clang 9f0d189820, Swift 1c720b8)) it produces: SourceKitServiceLeak.swift:2:23: warning: single argument function types require parentheses
private let path: PARAMS -> (String)
^~~~~~
( )
SourceKitServiceLeak.swift:4:25: warning: single argument function types require parentheses
public init(_ path: PARAMS -> String) {
^~~~~~
( )
SourceKitServiceLeak.swift:22:9: error: static member 'init(stringInterpolationSegment:)' cannot be used on instance of type 'String'
"\(a.propert)\(a)\(a)"
^~~~~~~~~~~~~~~~~~~~~~ Which is better because it does not get stuck, but the error message is still not helpful. |
Comment by Tadeas Kriz (JIRA) I edited the file slightly SourceKitServiceLeak_swift3.swift and got the compiler stuck as well using Swift 3. |
Speculatively putting on the type checker. Maybe we run amok trying to offer a near-miss fixit. |
Not a fix-it - looks like we're throwing the overload resolution engine into a loop when trying to cons up a diagnostic: frame #8: 0x0000000105ca90f9 swift`swift::constraints::ConstraintSystem::compareSolutions(cs=0x00007fff5b0b7428, solutions=ArrayRef<swift::constraints::Solution> @ 0x00007fff5b0acb50, diff=0x00007fff5b0ad1e8, idx1=2716, idx2=307) + 2041 at CSRanking.cpp:851 |
Fixed in Xcode 9 |
Attachment: Download
Environment
XCode 7.3.1
Apple Swift version 2.2 (swiftlang-703.0.18.8 clang-703.0.31)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
md5: 66fa91bd65bbc4079d9f2e6016ba16c0
Issue Description:
I've attached a small file to reproduce this. Just do
The text was updated successfully, but these errors were encountered: