diff options
author | Bad Diode <bd@badd10de.dev> | 2024-06-18 19:29:14 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2024-06-18 19:29:14 +0200 |
commit | c9db27abbbfa80a79515e26efaae9012d3275404 (patch) | |
tree | ff0dc2888b9e3f6e98cb76bfd07a5e3fafdd82dc /tests/conditionals.bad | |
parent | a0068318895ff8dea6d3c3f0db381fbca83e3f40 (diff) | |
download | bdl-c9db27abbbfa80a79515e26efaae9012d3275404.tar.gz bdl-c9db27abbbfa80a79515e26efaae9012d3275404.zip |
Fix some syntax issues with match cases
Diffstat (limited to 'tests/conditionals.bad')
-rw-r--r-- | tests/conditionals.bad | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/conditionals.bad b/tests/conditionals.bad index 71d49c3..b1c6a89 100644 --- a/tests/conditionals.bad +++ b/tests/conditionals.bad | |||
@@ -19,9 +19,10 @@ if true != false { | |||
19 | } | 19 | } |
20 | 20 | ||
21 | ; Match cases should only apply to literal values, for example `case 1 + 2` | 21 | ; Match cases should only apply to literal values, for example `case 1 + 2` |
22 | ; isn't allowed. | 22 | ; isn't allowed. They should generally convert to a lookup table. |
23 | match 4 * 2 { | 23 | match a = { |
24 | case 8 = "hello" | 24 | case 8 = "hello" |
25 | case 9 = "world" | 25 | case 9 = "world" |
26 | case = "what" | 26 | else = "what" |
27 | } | 27 | } |
28 | |||