Skip to content
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

[MiscDiagnostics] Diagnose passing a non-@objc dynamic KeyPath property to KVO observe #28135

Merged
merged 1 commit into from Nov 8, 2019
Merged

Conversation

theblixguy
Copy link
Collaborator

Passing a KeyPath to a property which is not marked @objc dynamic to the KVO observe method can cause unexpected behavior or a runtime trap.

Resolves SR-5115
Resolves SR-5159
Resolves SR-5177
Resolves rdar://problem/32593787
Resolves rdar://problem/32775952

@theblixguy theblixguy requested a review from xedin November 7, 2019 22:56
@theblixguy
Copy link
Collaborator Author

@swift-ci please smoke test

lib/Sema/MiscDiagnostics.cpp Outdated Show resolved Hide resolved
test/expr/primary/keypath/keypath-observe-objc.swift Outdated Show resolved Hide resolved
lib/Sema/MiscDiagnostics.cpp Outdated Show resolved Hide resolved
@theblixguy
Copy link
Collaborator Author

@swift-ci please smoke test

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.

None yet

2 participants