aboutsummaryrefslogtreecommitdiffstats
path: root/tests/compilation.bad
blob: 257a6e770df55d5eeaf94ce66fbf8f7ced1e38b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
; let name = "alex"
; let copy = "susan"
; println(name)
; println(copy)
; set copy = name
; println(copy)

; fun greet(name: str greeting: str): nil println("hello " name " " greeting "!")

; greet(name "WOOOW")

fun tester(condition: bool): nil {
    if condition println("ding") else println("dong")
}

tester(false)
println(true)
println(1 == 2)

; let y = 4
; fun nested(): nil {
;     fun adder(a: int b: int): int {
;         fun printer(): nil println("ho!")
;         printer()
;         printer()
;         printer()
;         y + a + b
;     }
;     for let i = 0, i < 10, set i += 1 {
;         println("i: " i " " adder(i, 2))
;     }
; }

; nested()
; printer()