Skip to content

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

@LuKuangChen

Description

@LuKuangChen
$ 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))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions