diff options
author | Bad Diode <bd@badd10de.dev> | 2024-06-24 17:51:18 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2024-06-24 17:51:18 +0200 |
commit | 8658d71e8a0761f8407b35cdf08b4b80229f560e (patch) | |
tree | 80440edae7a8c6083c903a39f6531fd106c1988c /tests | |
parent | 2560da172f15982da7464a6534702c08f9b7575d (diff) | |
download | bdl-8658d71e8a0761f8407b35cdf08b4b80229f560e.tar.gz bdl-8658d71e8a0761f8407b35cdf08b4b80229f560e.zip |
Add field accessor for typechecking enum fields
Diffstat (limited to 'tests')
-rw-r--r-- | tests/semantics.bad | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/semantics.bad b/tests/semantics.bad index ee56c14..486f6c0 100644 --- a/tests/semantics.bad +++ b/tests/semantics.bad | |||
@@ -7,6 +7,9 @@ enum weekdays { | |||
7 | sat | 7 | sat |
8 | sun | 8 | sun |
9 | } | 9 | } |
10 | let a = weekdays.tue | ||
11 | let b = a | ||
12 | |||
10 | ; fun add10(a: int, b: str): int { | 13 | ; fun add10(a: int, b: str): int { |
11 | ; a + 10 | 14 | ; a + 10 |
12 | ; } | 15 | ; } |