[SR-10592] ExpressibleByArrayLiteral won't compile on type nested in a generic type. #52992
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
type checker
Area → compiler: Semantic analysis
Environment
MacOS 10.14.4
Xcode and command line tools 10.2.1
Additional Detail from JIRA
md5: f27798e55c6f49438c30d3b4a0ac8307
Issue Description:
I'm not able to use the ExpressibleByArrayLiteral Protocol when applying it to a nested type that has a parent type that works with a generic type. Some example code:
The last line won't compile, giving the error:
Cannot convert value of type '[Int]' to specified type 'Tensor.Shape'
When removing the generic type <Element> from the Tensor struct, everything compiles.
Could be that I'm missing something, but I think this should just work right?
The text was updated successfully, but these errors were encountered: