Property wrappers unable to infer generic types when wrappedValue
is an opaque type.
#61274
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
generics
Feature: generic declarations and types
property wrappers
Feature: property wrappers
type checker
Area → compiler: Semantic analysis
Describe the bug
When a generic property wrapper's
wrappedValue
is an opaque type (ie using thesome
keyword), the generic types are unable to be inferred.Steps To Reproduce
Gives the following errors
Explicitly adding the generics to the property wrapper type removes all but the last error.
Expected behavior
The generics for the property wrapper should be inferred from the generics used for the wrapped value.
Using
any
previously had the same issue in swift 5.7 butScreenshots
n/a
Environment (please fill out the following information)
Additional context
n/a
The text was updated successfully, but these errors were encountered: