Closed tadeuzagallo closed 8 years ago
Right now only the tag of the constructor is check, but not to which type does it belong, e.g.
type Foo { X(Int) } type Bar { Y(Int) } _(x: Foo): Void { let Y(y) = x { print(y) } }(X(42))
The type checker should be able to catch that it's being matched with a constructor that belongs to a different type.
Right now only the tag of the constructor is check, but not to which type does it belong, e.g.
The type checker should be able to catch that it's being matched with a constructor that belongs to a different type.