diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-06-30 18:39:46 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-30 18:39:46 -0400 |
| commit | 1951051e3d692d8257e46fc23a7dff9447828fd7 (patch) | |
| tree | 24d1e8ec92fcc47c7774a6ed35b3e228796d1158 /src/Module.zig | |
| parent | 77a334451f1329110d6c1bd07b46813cef10e97c (diff) | |
| parent | 4cde6dd10902ebeec3b3000b76d6395c49f5a241 (diff) | |
| download | zig-1951051e3d692d8257e46fc23a7dff9447828fd7.tar.gz zig-1951051e3d692d8257e46fc23a7dff9447828fd7.zip | |
Merge pull request #11942 from Vexu/stage2-compile-errors
Move passing stage1 compile error tests to stage2
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Module.zig b/src/Module.zig index bdf206490d..1f70a44df5 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -503,6 +503,8 @@ pub const Decl = struct { alive: bool, /// Whether the Decl is a `usingnamespace` declaration. is_usingnamespace: bool, + /// If true `name` is already fully qualified. + name_fully_qualified: bool = false, /// Represents the position of the code in the output file. /// This is populated regardless of semantic analysis and code generation. @@ -686,6 +688,9 @@ pub const Decl = struct { pub fn renderFullyQualifiedName(decl: Decl, mod: *Module, writer: anytype) !void { const unqualified_name = mem.sliceTo(decl.name, 0); + if (decl.name_fully_qualified) { + return writer.writeAll(unqualified_name); + } return decl.src_namespace.renderFullyQualifiedName(mod, unqualified_name, writer); } |
