aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/semantics.bad30
1 files changed, 20 insertions, 10 deletions
diff --git a/tests/semantics.bad b/tests/semantics.bad
index 158cec6..c316a3c 100644
--- a/tests/semantics.bad
+++ b/tests/semantics.bad
@@ -1,15 +1,25 @@
1; let a:f32 = (1.0 + 2.0 * 2.0) / 2.0 1; let a:f32 = (1.0 + 2.0 * 2.0) / 2.0
2 2
3let annotated:int = (1 + 2 * 2) / 2 3; let annotated:int = (1 + 2 * 2) / 2
4let numbers = 1 4; let numbers = 1
5let symbols = numbers 5; let symbols = numbers
6let arith = 1 + 2 * 4 6; let arith = 1 + 2 * 4
7let cmp = 1 <= 2 7; let cmp = 1 <= 2
8let logic = !true && false || (1 <= 2) 8; let logic = !true && false || (1 <= 2)
9let bits = 0xff & 0b00001111 9; let bits = 0xff & 0b00001111
10let block = { 10; let block = {
11 let a = 1 + 2 11; let a = 1 + 2
12 a + 3 12; a + 3
13; }
14
15let maybe = if (1 == 2) {
16 32
17} else {
18 44
19}
20
21let single = if (true) {
22 123
13} 23}
14 24
15; enum test { 25; enum test {