Allow using 'var' to declare lambdas in functions.

This commit is contained in:
Christoffer Lerno
2025-01-01 01:02:35 +01:00
parent 78ff1a4af5
commit 0a809ab5f0
3 changed files with 58 additions and 49 deletions

View File

@@ -0,0 +1,8 @@
module test;
import std;
fn void main()
{
var x = fn int(int y) { return y * 2; };
io::printn(x(4));
io::printn(x(3));
}