Initial work for functions as values. Actually works, but you can't write out the type and thus can only declare function pointer variables with type inference.
This commit is contained in:
1
tests/test_functionsValues.expected_results
Normal file
1
tests/test_functionsValues.expected_results
Normal file
@@ -0,0 +1 @@
|
||||
9
|
||||
13
tests/test_functionsValues.krak
Normal file
13
tests/test_functionsValues.krak
Normal file
@@ -0,0 +1,13 @@
|
||||
import io:*
|
||||
|
||||
fun test(): void {
|
||||
println(9)
|
||||
}
|
||||
|
||||
fun main(): int {
|
||||
var val = test
|
||||
val()
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user