diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-04-29 19:57:44 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2023-05-01 19:22:52 -0400 |
| commit | 372bc960b8315ea1ff17b369b0b33485d5e34cfb (patch) | |
| tree | 8f492631dec579c28b8430e80213f6ad4d286dd9 /src/link.zig | |
| parent | f37ca3fa7370c501c630c53b370fecdeb313e3be (diff) | |
| download | zig-372bc960b8315ea1ff17b369b0b33485d5e34cfb.tar.gz zig-372bc960b8315ea1ff17b369b0b33485d5e34cfb.zip | |
link: update decl-specific lazy symbols
Diffstat (limited to 'src/link.zig')
| -rw-r--r-- | src/link.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/link.zig b/src/link.zig index 672a53999f..74e3ca85fc 100644 --- a/src/link.zig +++ b/src/link.zig @@ -1120,8 +1120,8 @@ pub const File = struct { kind: Kind, ty: Type, - pub fn initDecl(kind: Kind, decl: Module.Decl.OptionalIndex, mod: *Module) LazySymbol { - return .{ .kind = kind, .ty = if (decl.unwrap()) |decl_index| + pub fn initDecl(kind: Kind, decl: ?Module.Decl.Index, mod: *Module) LazySymbol { + return .{ .kind = kind, .ty = if (decl) |decl_index| mod.declPtr(decl_index).val.castTag(.ty).?.data else Type.anyerror }; |
