aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2024-06-23 21:59:35 +0200
committerBad Diode <bd@badd10de.dev>2024-06-23 21:59:35 +0200
commit55849f31e9ad0d2faadd7488ca25669737d74b8d (patch)
tree175187d3bf70eb9a50dd8b335460ffb52c5cfc98 /tests
parent25444d18759bb7dde28dc6cb7a1554a08a125e34 (diff)
downloadbdl-55849f31e9ad0d2faadd7488ca25669737d74b8d.tar.gz
bdl-55849f31e9ad0d2faadd7488ca25669737d74b8d.zip
Add wip function typechecking
Diffstat (limited to 'tests')
-rw-r--r--tests/semantics.bad18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/semantics.bad b/tests/semantics.bad
index 5b5c971..47c4b88 100644
--- a/tests/semantics.bad
+++ b/tests/semantics.bad
@@ -28,10 +28,10 @@
28 28
29; set single = 32 29; set single = 32
30 30
31cond { 31; cond {
32 1 == 2 = "hello" 32; 1 == 2 = "hello"
33 else = "dong" 33; else = "dong"
34} 34; }
35 35
36; enum test { 36; enum test {
37; a = 1 37; a = 1
@@ -48,7 +48,7 @@ cond {
48 48
49; fun nested(): u32 { 49; fun nested(): u32 {
50; fun adder(a: u32, b: u32): u32 a + b 50; fun adder(a: u32, b: u32): u32 a + b
51; if (1 + 1) { 51; if (1 + 1 == 2) {
52; { 52; {
53; let b = 32 53; let b = 32
54; } 54; }
@@ -110,10 +110,10 @@ cond {
110; 1 + 1 + c 110; 1 + 1 + c
111; } 111; }
112 112
113; This should err. 113fun foo(a: int b: str): (f32, f64) {
114; fun foo(): nil { 114 return(1.0, 2.0)
115; 1 115}
116; } 116
117; let b = a 117; let b = a
118; let a = a 118; let a = a
119; set a = 10 119; set a = 10