over-aggressive simplification to homogenous Tuple type
Closed this issue · 4 comments
jvasileff commented
I don't know if this affects actual type checking, but the type inference information available in error messages and IDE mouseovers incorrectly simplifies Tuple
intersections with Sequential
to canonical, homogeneous Tuple
s, disregarding Tuple
's type parameters that are not present in Sequential
.
The mouseover on value
for:
value seq = (nothing of <String|Integer>[2] & Integer[]);
is "Inferred type Integer[2]
"
And the error message for:
value seq = (nothing of <String|Integer>[2] & Integer[]);
Integer[2] seq2 = seq;
sometimes says "Integer[2]
is not assignable to Integer[2]
".
gavinking commented
Is this a dupe of non-bug ceylon/ceylon-model#6?
gavinking commented
Oh no, unlike ceylon/ceylon-model#6 it seems to be an actual bug. But like ceylon/ceylon-model#6 this is nothing to do with the typechecker itself, AFAICT, and is just a minor bug in TypePrinter
in ceylon-model
.
jvasileff commented
Sounds right
gavinking commented
Fixed.