swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.57k stars 10.36k forks source link

[SR-7406] Require availability checks for Swift KeyPath #49949

Closed jegnux closed 6 years ago

jegnux commented 6 years ago
Previous ID SR-7406
Radar rdar://problem/39319212
Original Reporter @jegnux
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, KeyPaths | |Assignee | None | |Priority | Medium | md5: d56d2e77f97faa4da5f5f1f09f41acf5

is duplicated by:

Issue Description:

Description

Using a KeyPath of a new property is possible without any availability check, leading to a crash at runtime.

Steps to reproduce

belkadan commented 6 years ago

@swift-ci create

slavapestov commented 6 years ago

https://github.com/apple/swift/pull/17778