mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 13:30:45 +00:00
Module: fix fieldSrcLoc for generated types
This commit is contained in:
parent
510b891d27
commit
7b131a7cd4
@ -1044,7 +1044,8 @@ pub const Struct = struct {
|
||||
|
||||
.root => return queryFieldSrc(tree.*, query, file, tree.containerDeclRoot()),
|
||||
|
||||
else => unreachable,
|
||||
// This struct was generated using @Type
|
||||
else => return s.srcLoc(mod),
|
||||
}
|
||||
}
|
||||
|
||||
@ -1270,7 +1271,8 @@ pub const Union = struct {
|
||||
.tagged_union_enum_tag,
|
||||
.tagged_union_enum_tag_trailing,
|
||||
=> return queryFieldSrc(tree.*, query, file, tree.taggedUnionEnumTag(node)),
|
||||
else => unreachable,
|
||||
// This union was generated using @Type
|
||||
else => return u.srcLoc(mod),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user