diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2024-12-30 01:56:48 +0000 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2024-12-31 09:55:04 +0000 |
| commit | 9ff80d7950a720cf80294ceaec54cc33d22f8871 (patch) | |
| tree | f0ce20049b120f23316ff5a2b5756c71f30036e1 /test/cases/compile_errors/compile_time_struct_field.zig | |
| parent | 07b936c95fb460c1b71b0b246ba1576167442721 (diff) | |
| download | zig-9ff80d7950a720cf80294ceaec54cc33d22f8871.tar.gz zig-9ff80d7950a720cf80294ceaec54cc33d22f8871.zip | |
cases: update to new compile error wordings
Diffstat (limited to 'test/cases/compile_errors/compile_time_struct_field.zig')
| -rw-r--r-- | test/cases/compile_errors/compile_time_struct_field.zig | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/test/cases/compile_errors/compile_time_struct_field.zig b/test/cases/compile_errors/compile_time_struct_field.zig index 8ca502f645..adfcc440e6 100644 --- a/test/cases/compile_errors/compile_time_struct_field.zig +++ b/test/cases/compile_errors/compile_time_struct_field.zig @@ -4,16 +4,15 @@ const S = struct { }; export fn a() void { - var value: u32 = 3; - const comptimeStruct = S { - .normal_ptr = &value, - }; - _ = comptimeStruct; + var value: u32 = 3; + const comptimeStruct = S{ + .normal_ptr = &value, + }; + _ = comptimeStruct; } // error -// backend=stage2 -// target=native // -// 9:6: error: unable to resolve comptime value -// 9:6: note: initializer of comptime only struct must be comptime-known +// :9:10: error: unable to resolve comptime value +// :9:10: note: initializer of comptime-only struct 'tmp.S' must be comptime-known +// :2:21: note: struct requires comptime because of this field |
