You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swift-ci opened this issue
Nov 29, 2017
· 5 comments
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfkey pathsFeature: key paths (both native and Objective-C)
@belkadan a `let` should get a WritableKeyPath during initialization, inside the init method, but not anytime else. Please don't break that behavior at least.
jonathan.gilbert (JIRA User) there's no way to prevent a key path taken in an initialization context from being passed out and used later, and key paths can only even be applied to objects that are already fully initialized, since initialization checking does not dynamic modifications such as those through key paths.
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfkey pathsFeature: key paths (both native and Objective-C)
Additional Detail from JIRA
md5: 9167219e12ed0523b5aef349c7018e24
is duplicated by:
relates to:
Issue Description:
I was expecting the guard statement to fail and prevent me from writing to the immutable property, but it doesn't.
Is this a bug or the intended behavior? I was skeptical of using this approach as if it's a bug it might break my code in future versions of Swift.
The text was updated successfully, but these errors were encountered: