Grift icon indicating copy to clipboard operation
Grift copied to clipboard

A bug about casting to supertype

Open LuKuangChen opened this issue 7 years ago • 1 comments

This program cannot be compiled with the latest compiler in the master branch.

(: (tuple 42 #f) (Tuple Int))

LuKuangChen avatar Jan 16 '19 20:01 LuKuangChen

Here is another program that we should make sure that the type-checker and runtime rejects.

(ann (vector 1 (tuple 1 #f)) (Vect (Tuple Int)))

Here the contents of the vector have to be invariant with respect to the subtyping relationship.

akuhlens avatar Mar 01 '19 16:03 akuhlens