mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-06-22 00:21:56 -04:00
4a65cc4aca
This logic existed when actually analyzing a `nav_ty` unit directly; it was just missing in the code path which resolves a `nav_ty` unit due to a `nav_val` being resolved. Resolves: #35307
24 lines
441 B
Plaintext
24 lines
441 B
Plaintext
#update=initial version
|
|
#file=main.zig
|
|
const foo = {};
|
|
pub fn main() void {
|
|
_ = &foo;
|
|
}
|
|
#expect_stdout=""
|
|
|
|
#update=introduce use of undeclared identifier
|
|
#file=main.zig
|
|
const foo = something;
|
|
pub fn main() void {
|
|
_ = &foo;
|
|
}
|
|
#expect_error=main.zig:1:13: error: use of undeclared identifier 'something'
|
|
|
|
#update=revert use of undeclared identifier
|
|
#file=main.zig
|
|
const foo = {};
|
|
pub fn main() void {
|
|
_ = &foo;
|
|
}
|
|
#expect_stdout=""
|