Add test for optionals
This commit is contained in:
parent
37a7beb28f
commit
7dc8189266
15
test/optionals.tm
Normal file
15
test/optionals.tm
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
func main():
|
||||||
|
>> opt := @5?
|
||||||
|
when opt is @nonnull:
|
||||||
|
>> nonnull[]
|
||||||
|
= 5
|
||||||
|
else:
|
||||||
|
fail("Oops")
|
||||||
|
|
||||||
|
>> opt = !@Int
|
||||||
|
when opt is @nonnull:
|
||||||
|
fail("Oops")
|
||||||
|
else:
|
||||||
|
>> opt
|
||||||
|
= !Int
|
Loading…
Reference in New Issue
Block a user