Fix type checking for anonymous functions

This commit is contained in:
nub31
2025-06-08 17:26:50 +02:00
parent de071808e6
commit dce5a2b566
7 changed files with 140 additions and 31 deletions

View File

@@ -2,23 +2,42 @@ namespace main
struct Human {
age: u64
print_age: func() = () => {
print_age: func() = func() {
c::puts("pwp")
}
}
export func main(args: []^string): i64 {
let x = 2
let uwu = func() {
c::puts("uwu")
}
uwu()
func() {
c::puts("owo")
}()
let me = alloc Human {
age = 23
}
me.print_age()
print_age()
if true {
// do something
}
c::puts("test")
let i = 1
while i <= 10 {
c::puts("test")
i = i + 1
}
return 0
}
func print_age() {
c::puts("TEST")
}