diff options
Diffstat (limited to 'test/cases')
| -rw-r--r-- | test/cases/compile_errors/accessing_runtime_paramter_outside_function_scope.zig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/cases/compile_errors/accessing_runtime_paramter_outside_function_scope.zig b/test/cases/compile_errors/accessing_runtime_paramter_outside_function_scope.zig new file mode 100644 index 0000000000..583b7128c7 --- /dev/null +++ b/test/cases/compile_errors/accessing_runtime_paramter_outside_function_scope.zig @@ -0,0 +1,12 @@ +export fn entry(y: u8) void { + const Thing = struct { + y: u8 = y, + }; + _ = @sizeOf(Thing); +} + +// error +// backend=stage2 +// target=native +// +// :3:17: error: 'y' not accessible outside function scope |
