diff options
| -rw-r--r-- | test/optionals.tm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/optionals.tm b/test/optionals.tm new file mode 100644 index 00000000..5f6fb78a --- /dev/null +++ b/test/optionals.tm @@ -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 |
