rascal
rascal copied to clipboard
Type.rsc is out of sync with actual implementation of Rascal's type system
Describe the bug
Type.rsc
is out of sync with the actual implementation of Rascal's type system
Expected behavior
Type.rsc
defines functions like subtype
, lub
and glb
on Rascal types. These definitions should be fully compatible with the actual implementation in the interpreter. There are subtle differences in the handling of function types.
Desktop (please complete the following information):
- Context: Eclipse plugin
- Rascal Version 0.28.1
Ok let's fix this and let's introduce a compatibility test using the type reifier. We can see if:
t1.JavaIsSubtypeOf(t2) <==> RascalIsSubtypeOf(reify(t1), reify(t2))
and similar equivalences, preferably using the random type generator as well, next to some typical regression cases.