[SR-12233] Type inference not working with property wrapper? #54659
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
property wrappers
Feature: property wrappers
type checker
Area → compiler: Semantic analysis
Environment
Swift 5.1, Swift 5.2
Additional Detail from JIRA
md5: 6e2736eef3570f149b65e252a002be75
duplicates:
Issue Description:
When using a property wrapper with a generic function, the type inference seems not to work. The following code shows the issue, which can also be found as a swift package here: https://github.com/danielctull-tests/PropertyWrapperInferenceTest
It seems that when using
value
, the compiler is inferring the wrapper rather than the wrapped value.Manifests with:
Xcode 11.3.1 (11C504)
Xcode 11.4 beta (11N111s)
Docker images:
swift:5.1
swiftlang/swift:nightly-5.2 (Swift version 5.2-dev (Swift 1933cc7))
swiftlang/swift:nightly (Swift version 5.2-dev (LLVM 89a551f, Swift 4b2b436))
Failing builds can be found here: https://github.com/danielctull-tests/PropertyWrapperInferenceTest/actions/runs/41808784
The text was updated successfully, but these errors were encountered: