[SR-12530] Faulty compiler error when passing keypath to property wrapper in Swift 5.2 #54973
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 5.2
Attachment: Download
Additional Detail from JIRA
md5: 08076328c000c9215ccfcb5afab360f0
Issue Description:
The Problem:
The below code compiles fine on Swift 5.1 compiler, however Swift 5.2 introduced a bug in the compiler. Now it fails to compile, with the error "Key path cannot refer to static member 'bar'"
Current Workaround
The following compiles in 5.2 with no errors and works fine:
This is not an acceptable workaround though due to how many places we would need to use it. As a result this bug makes Swift 5.2 unusable for us. Please fix soon, thanks.
The text was updated successfully, but these errors were encountered: