mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Add @safeinfer to allow var to be used locally.
This commit is contained in:
5
test/test_suite/attributes/safe_infer.c3
Normal file
5
test/test_suite/attributes/safe_infer.c3
Normal file
@@ -0,0 +1,5 @@
|
||||
fn int main(String[] args)
|
||||
{
|
||||
var y @safeinfer = 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user