Grift icon indicating copy to clipboard operation
Grift copied to clipboard

Another case where type-based-casts and coercions are not equivalent

Open LuKuangChen opened this issue 6 years ago • 0 comments

$ grift --type-based-casts p2.grift
$ ./a.out 
Implicit cast in ascription on expression at p2.grift:3:3
$ grift --coercions p2.grift
$ ./a.out 
Implicit cast in ascription on expression at p2.grift:1:1

The content of p2.grift

((ann
  (ann
   (ann
    (ann
     (ann
      (lambda ([x : (Tuple Int Int)]) x)
      ((Tuple Int Int) -> (Tuple Int Int)))
     ((Tuple Int Int) -> (Tuple Dyn Int)))
    ((Tuple Int Int) -> (Tuple Bool Int)))
   ((Tuple Int Int) -> Dyn))
  ((Tuple Int Int) -> Bool))
 (tuple 1 2))

LuKuangChen avatar Oct 09 '19 01:10 LuKuangChen