Error if a stack allocated variable is too big (configurable with --max-stack-object-size).

This commit is contained in:
Christoffer Lerno
2025-08-21 00:33:56 +02:00
parent b7c9a4e2e9
commit a2ef63f5b6
12 changed files with 54 additions and 26 deletions

View File

@@ -0,0 +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)
return 0;
}