Closed shviller closed 2 years ago
Thank you for the report and for the detailed reproduction steps!
One more question: which Teal version was this on? Does this happen also with the latest code in master
?
Just putt he code in the teal playground and it seems to happen there
@lenscas hah, smart way to quickly test on master
, thanks! I was on my phone and I hadn't thought of that :)
I believe I fixed it!
results in a rather surreal error message:
To reproduce, the type that ends up "not itself" has to be nested, and it needs to be an alias for another user-defined type. That is, using
M.Type1
works, moving bothType1
andType2
out ofM
works, but moving onlyType1
and keepingType2
insideM
does not. The type ofmap
also matters: making it non-generic (that is,function({M.Type2}): {M.Type2: number}
works, making it return an array (function({E}): {E}
) also works.