You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error("Product not defined on void and void",|project://rascal/src/org/rascalmpl/library/lang/rascal/tests/basic/Maps.rsc|(915,3,<26,32>,<26,35>))
error("map[int, int] and map[str, str] incomparable",|project://rascal/src/org/rascalmpl/library/lang/rascal/tests/basic/Maps.rsc|(1728,10,<49,8>,<49,18>))
error("map[int, int] and map[str, str] incomparable",|project://rascal/src/org/rascalmpl/library/lang/rascal/tests/basic/Maps.rsc|(2819,10,<85,10>,<85,20>))
error("value must be a subtype of void",|project://rascal/src/org/rascalmpl/library/lang/rascal/tests/basic/Maps.rsc|(626,8,<20,41>,<20,49>))
error("map[int, int] and map[real, int] incomparable",|project://rascal/src/org/rascalmpl/library/lang/rascal/tests/basic/Maps.rsc|(3020,18,<94,24>,<94,42>))
The text was updated successfully, but these errors were encountered:
the first message is very interesting. The type checker is right because truly the whole expression does not have any possible meaning. It sees the list is empty and because emptiness is represented first class in the type system by void it can compute that the multiplication does not make sense. I believe this is great and we should make the test more complex to make the type checker not able to see this.
the second message is a correct static error afaik; this is where the type checker can help if types are incomparable a comparison between values does not make sense (i.e. is either tautological or contradictory).
same for the third
the fourth message is the same story as the first message
the fifth is the same story as the second
I propose we:
rewrite the tests such that the type checker can't find the tautologies
invest in the future to explain these tautologies better in the error message
Either that or we define that void is defined on all operators, which is also a valid static interpretation and will hide the first and the fourth message but not the second, third and fifth.
The text was updated successfully, but these errors were encountered: