aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2024-06-24 11:19:04 +0200
committerBad Diode <bd@badd10de.dev>2024-06-24 11:19:04 +0200
commit15e24115a2a117407157c993fe17b2d414dc0bf4 (patch)
tree0fd846846d82bca5ecfa9c40ffaa31bbf39159aa /tests
parent55849f31e9ad0d2faadd7488ca25669737d74b8d (diff)
downloadbdl-15e24115a2a117407157c993fe17b2d414dc0bf4.tar.gz
bdl-15e24115a2a117407157c993fe17b2d414dc0bf4.zip
Add proper parsing of return statements and functions params
Diffstat (limited to 'tests')
-rw-r--r--tests/semantics.bad17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/semantics.bad b/tests/semantics.bad
index 47c4b88..5071d8b 100644
--- a/tests/semantics.bad
+++ b/tests/semantics.bad
@@ -90,16 +90,16 @@
90; 1 + 1 + c 90; 1 + 1 + c
91; } 91; }
92 92
93; fun testmatches(): nil { 93; fun testmatches(num: int): int {
94; match (num) { 94; ; match (num) {
95; case 1 = 23 95; ; case 1 = 23
96; case 2 = num 96; ; case 2 = num
97; else = num 97; ; else = num
98; } 98; ; }
99 99
100; cond { 100; cond {
101; case 1 == 1 = 23 101; 1 == 1 = 23
102; case 2 != 1 = num 102; 2 != 1 = num
103; else = num 103; else = num
104; } 104; }
105; } 105; }
@@ -109,7 +109,6 @@
109; let c = 1 109; let c = 1
110; 1 + 1 + c 110; 1 + 1 + c
111; } 111; }
112
113fun foo(a: int b: str): (f32, f64) { 112fun foo(a: int b: str): (f32, f64) {
114 return(1.0, 2.0) 113 return(1.0, 2.0)
115} 114}