diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-07-15 16:05:06 +0300 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-07-15 16:06:16 +0300 |
| commit | cf207df5926c2f303ad92069e44bec51bfa44148 (patch) | |
| tree | 093fb27867621e32699bd7fdd179b4e045846917 /lib | |
| parent | 1463144fc88550ba1dca3888acdcdd4903781222 (diff) | |
| download | zig-cf207df5926c2f303ad92069e44bec51bfa44148.tar.gz zig-cf207df5926c2f303ad92069e44bec51bfa44148.zip | |
Module: improve source spans for initializers and var types
```zig
const U = union { foo: u32, bar: u32 };
test {
var a = U{ .foo = 1213, .bar = 1123 };
_ = a;
}
test {
var a: (123 + 5238094) = 0;
_ = a;
}
```
before:
```
:30: note: additional initializer here
var a = U{ .foo = 1213, .bar = 1123 };
^~~
:12: error: expected type 'type', found 'comptime_int'
var a: (123 + 5238094) = 0;
^
```
after:
```
:30: note: additional initializer here
var a = U{ .foo = 1213, .bar = 1123 };
~^~~~~~~~~~
:12: error: expected type 'type', found 'comptime_int'
var a: (123 + 5238094) = 0;
^~~~~~~~~~~~~~~
```
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions
