mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-17 08:27:45 +03:00
Fix some memory errors (that should be compiler errors).
This commit is contained in:
parent
6f70dbd18e
commit
26a4b02009
@ -35,17 +35,17 @@
|
||||
(Nest.Nested (Nest.Nested (Nest.Nested x)))
|
||||
x)
|
||||
"Match matches nested sumtype constructors with variables")
|
||||
(let [m (Maybe.Just @"hello")]
|
||||
(assert-equal test
|
||||
"hello"
|
||||
(let [m (Maybe.Just @"hello")]
|
||||
(match-ref &m
|
||||
(Maybe.Nothing) "wrong"
|
||||
(Maybe.Just x ) x))
|
||||
"match-ref works on simple sumtype")
|
||||
(Maybe.Just x ) x)
|
||||
"match-ref works on simple sumtype"))
|
||||
(let [n (Nest.Nested (Nest.Nested (Nest.Nested @"found")))]
|
||||
(assert-equal test
|
||||
"found"
|
||||
(let [n (Nest.Nested (Nest.Nested (Nest.Nested @"found")))]
|
||||
(match-ref &n
|
||||
(Nest.Nested (Nest.Nested (Nest.Nested s))) s))
|
||||
"match-ref works on deeply nested sumtype")
|
||||
(Nest.Nested (Nest.Nested (Nest.Nested s))) s)
|
||||
"match-ref works on deeply nested sumtype"))
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user