[SR-514] Generic type cannot construct itself with a transformed type #43131
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Additional Detail from JIRA
md5: 25c05faa51facf7575dd488e4683f95d
duplicates:
Issue Description:
Example:
This code produces the error:
Though it makes sense that this error occurs, since within Wrapper's implementation, T is bound to a concrete type, this shouldn't happen. Expected behavior is that Wrapper<T> can be constructed with any type.
It's maybe worth noting that there is a work-around:
But it's verbose and unintuitive.
The text was updated successfully, but these errors were encountered: