Sema: export function instead of the constant referencing it
Closes #13706
This commit is contained in:
@@ -5405,6 +5405,13 @@ fn zirExport(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!void
|
||||
},
|
||||
else => |e| return e,
|
||||
};
|
||||
{
|
||||
try sema.mod.ensureDeclAnalyzed(decl_index);
|
||||
const exported_decl = sema.mod.declPtr(decl_index);
|
||||
if (exported_decl.val.castTag(.function)) |some| {
|
||||
return sema.analyzeExport(block, src, options, some.data.owner_decl);
|
||||
}
|
||||
}
|
||||
try sema.analyzeExport(block, src, options, decl_index);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user