-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Index: Don't crash if an optional requirement is missing its witness #19378
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
Index: Don't crash if an optional requirement is missing its witness #19378
Conversation
@swift-ci Please smoke test |
test/Index/objc_conformances.swift
Outdated
// RUN: %target-swift-ide-test -print-indexed-symbols -source-filename %s | ||
|
||
// Let's just make sure this doesn't crash for now; there's nothing interesting | ||
// to see in the output here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: validation-test, then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might add more test cases later, with CHECK lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you add at least a single CHECK line it will be useful to serve as a sanity check that AST walking did take place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ll add a non-optional requirement and check that the witness got walked.
test/Index/objc_conformances.swift
Outdated
@@ -0,0 +1,12 @@ | |||
// RUN: %target-swift-ide-test -print-indexed-symbols -source-filename %s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs REQUIRES: objc_interop
.
Also if import Foundation
is required to be in the test case, I'd suggest to change to // RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You’re right, thanks.
Possibly fixes <rdar://problem/44499860>.
22cf003
to
28c5ad3
Compare
@swift-ci Please smoke test |
Possibly fixes rdar://problem/44499860.