Auto inferenced void return!
This commit is contained in:
3
tests/test_auto_void.expected_results
Normal file
3
tests/test_auto_void.expected_results
Normal file
@@ -0,0 +1,3 @@
|
||||
Woooo
|
||||
7
|
||||
uh huh
|
||||
16
tests/test_auto_void.krak
Normal file
16
tests/test_auto_void.krak
Normal file
@@ -0,0 +1,16 @@
|
||||
import io:*
|
||||
|
||||
fun retVoid() {
|
||||
println("Woooo")
|
||||
}
|
||||
|
||||
fun withParams(a:int, b:char*) {
|
||||
println(a)
|
||||
println(b)
|
||||
}
|
||||
|
||||
fun main():int {
|
||||
retVoid()
|
||||
withParams(7, "uh huh")
|
||||
return 0
|
||||
}
|
||||
@@ -20,6 +20,10 @@ fun main():int {
|
||||
callLambda(fun(a:int):void { println(a);})
|
||||
var j = 0
|
||||
while (j < 10) j = itr(j, fun(a:int):int { return a+1; })
|
||||
|
||||
//println("closures now")
|
||||
//var a = 1337
|
||||
//runLambda(fun():int { return a;})
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user