Update type-checker tests
This commit is contained in:
parent
fe4cc61819
commit
3152db9d32
1 changed files with 17 additions and 0 deletions
|
@ -135,6 +135,7 @@ enum Maybe a.
|
|||
let foo_1 : Maybe
|
||||
let foo_2 : Maybe Int
|
||||
let foo_3 : Maybe Int Int
|
||||
let foo_4 : Maybe Int Int Int
|
||||
```
|
||||
|
||||
## Can indirectly apply a polymorphic datatype to some type
|
||||
|
@ -152,3 +153,19 @@ enum Foo.
|
|||
|
||||
let f : Foo = MkFoo (MkApp (Just 1))
|
||||
```
|
||||
|
||||
## Record-declarations inside enum-declarations work
|
||||
|
||||
```
|
||||
enum Shape.
|
||||
Circle.
|
||||
radius: Int
|
||||
Rect.
|
||||
width: Int
|
||||
height: Int
|
||||
|
||||
let z = Circle { radius = 12 }
|
||||
let a = Rect { width = 12, height = 12 }
|
||||
|
||||
a == z
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue