Skip to content

Type-based-casts and coercions are not equivalent #81

@LuKuangChen

Description

@LuKuangChen

The blame labels are different.

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

Here is the content of p1.grift

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions