Add @safeinfer to allow var to be used locally.

This commit is contained in:
Christoffer Lerno
2025-08-21 12:39:08 +02:00
parent 6ab7198f2f
commit e2e2ca1d7f
8 changed files with 29 additions and 12 deletions

View File

@@ -0,0 +1,5 @@
fn int main(String[] args)
{
var y @safeinfer = 1;
return 0;
}

View File

@@ -1,6 +1,6 @@
import std;
fn int main(String[] args)
{
int[1024 * 1024] x; // #error: The size of this local variable (4096 Kb) exceeds the maximum allowed stack object size (128 Kb)
int[1024 * 1024] x; // #error: The size of this local variable (4096 Kb) exceeds the maximum allowed
return 0;
}