Skip to content

Use interface types when checking #keyPath. #7028

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

Merged
merged 1 commit into from
Jan 26, 2017

Conversation

jrose-apple
Copy link
Contributor

This avoids a crash when the path refers to a property in another Swift module.

SR-3714

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@slavapestov, is there a good way to find out if we have more of these mistakes?

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 2318d79771ed70e9b9577818ea5673a9c709972c
Test requested by - @jrose-apple

This avoids a crash when the path refers to a property in another
Swift module.

https://bugs.swift.org/browse/SR-3714
@jrose-apple jrose-apple force-pushed the keyPath-interface-types branch from 2318d79 to a06bc15 Compare January 25, 2017 17:38
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 2318d79771ed70e9b9577818ea5673a9c709972c
Test requested by - @jrose-apple

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 2318d79771ed70e9b9577818ea5673a9c709972c
Test requested by - @jrose-apple

@DougGregor
Copy link
Member

Take away VarDecl::getType() ;)

@DougGregor
Copy link
Member

(this LGTM, by the way)

@jrose-apple
Copy link
Contributor Author

This failed on a mangling test that (IIRC) is failing elsewhere; unfortunately the bots are now being upgraded.

@slavapestov
Copy link
Contributor

@jrose-apple Add assert(getDeclContext()->isLocalContext()) would shake out cases where we call getType() on a property of a type, but only test the case where the property is defined in the same module.

Or as Doug said, scrap this whole thing altogether, maybe add a LocalVarDecl subclass of VarDecl and move getType() there.

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test macOS

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - a06bc15
Test requested by - @jrose-apple

@jrose-apple
Copy link
Contributor Author

Jenkins Java error, but the testing did actually finish, as evidenced by the smoke test label being fine. Merging.

@jrose-apple jrose-apple merged commit 25e40d0 into swiftlang:master Jan 26, 2017
@jrose-apple jrose-apple deleted the keyPath-interface-types branch January 26, 2017 03:29
jrose-apple added a commit to jrose-apple/swift that referenced this pull request Jan 26, 2017
This avoids a crash when the path refers to a property in another
Swift module.

https://bugs.swift.org/browse/SR-3714
tkremenek added a commit that referenced this pull request Jan 26, 2017
…-types

Use interface types when checking #keyPath. (#7028)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants