diff options
author | Bad Diode <bd@badd10de.dev> | 2024-06-26 16:22:16 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2024-06-26 16:22:16 +0200 |
commit | 56510571a9d2c6c1242d5efc26c4ab2905269930 (patch) | |
tree | 822f11beede8454e6b817e8a247e2ed6460c8173 /tests | |
parent | 8194ea8fb891ecda56e9efc0069a27ae37ba0a1b (diff) | |
download | bdl-56510571a9d2c6c1242d5efc26c4ab2905269930.tar.gz bdl-56510571a9d2c6c1242d5efc26c4ab2905269930.zip |
Fill up main symbol table with everything we need
Diffstat (limited to 'tests')
-rw-r--r-- | tests/semantics.bad | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/tests/semantics.bad b/tests/semantics.bad index 09f6682..8a2818f 100644 --- a/tests/semantics.bad +++ b/tests/semantics.bad | |||
@@ -1,20 +1,19 @@ | |||
1 | fun foo(): int { | 1 | ; fun foo(a: int): int { |
2 | 1 | 2 | ; 1 |
3 | } | 3 | ; } |
4 | ; fun bar(): int { | 4 | ; fun bar(): int { |
5 | ; fun foo(): int 1 + 2 | 5 | ; fun foo(): int 1 + 2 |
6 | ; 1 | 6 | ; 1 |
7 | ; } | 7 | ; } |
8 | ; struct vec { | 8 | struct vec { |
9 | ; x: f64 | 9 | x: f64 |
10 | ; y: f64 | 10 | y: f64 |
11 | ; huh: { | 11 | huh: { |
12 | ; z: int | 12 | z: int |
13 | ; id: str | 13 | id: str |
14 | ; } | 14 | } |
15 | ; } | 15 | } |
16 | let a = 1 | 16 | let a = 1 |
17 | let a = 2 | ||
18 | ; struct vec { | 17 | ; struct vec { |
19 | ; x: f64 | 18 | ; x: f64 |
20 | ; y: f64 | 19 | ; y: f64 |
@@ -82,15 +81,15 @@ let a = 2 | |||
82 | ; } | 81 | ; } |
83 | ; let v = vec : { x = 1.0 } | 82 | ; let v = vec : { x = 1.0 } |
84 | 83 | ||
85 | ; enum weekdays { | 84 | enum weekdays { |
86 | ; mon = 1 | 85 | mon = 1 |
87 | ; tue | 86 | tue |
88 | ; wed | 87 | wed |
89 | ; thu | 88 | thu |
90 | ; fri | 89 | fri |
91 | ; sat | 90 | sat |
92 | ; sun | 91 | sun |
93 | ; } | 92 | } |
94 | ; let a = weekdays.tue | 93 | ; let a = weekdays.tue |
95 | ; let b = a | 94 | ; let b = a |
96 | 95 | ||