diff options
| author | Veikka Tuominen <git@vexu.eu> | 2023-01-27 15:54:11 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2023-01-30 15:20:16 +0200 |
| commit | b129350cb5de2251d50b142a50d8d74ccd92ae73 (patch) | |
| tree | 9c293f26ae3b6f310262b00b85cd5e993ea745d6 /test/cases/compile_errors | |
| parent | dd300d47b22c740ab75ace54057a3831606f7952 (diff) | |
| download | zig-b129350cb5de2251d50b142a50d8d74ccd92ae73.tar.gz zig-b129350cb5de2251d50b142a50d8d74ccd92ae73.zip | |
AstGen: fix crash on invalid decltest
Closes #14476
Diffstat (limited to 'test/cases/compile_errors')
| -rw-r--r-- | test/cases/compile_errors/invalid_decltest.zig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/cases/compile_errors/invalid_decltest.zig b/test/cases/compile_errors/invalid_decltest.zig new file mode 100644 index 0000000000..cde984f366 --- /dev/null +++ b/test/cases/compile_errors/invalid_decltest.zig @@ -0,0 +1,13 @@ +export fn foo() void { + const a = 1; + struct { + test a {} + }; +} + +// error +// backend=stage2 +// target=native +// +// :4:14: error: cannot test a local constant +// :2:11: note: local constant declared here |
