Merge pull request #13032 from jacobly0/br-on-undef-val
stage2: fix branches on undefined values
This commit is contained in:
@@ -2332,10 +2332,13 @@ pub const Object = struct {
|
||||
// buffer is only used for int_type, `builtin` is a struct.
|
||||
const builtin_ty = mod.declPtr(builtin_decl).val.toType(undefined);
|
||||
const builtin_namespace = builtin_ty.getNamespace().?;
|
||||
const stack_trace_decl = builtin_namespace.decls
|
||||
const stack_trace_decl_index = builtin_namespace.decls
|
||||
.getKeyAdapted(stack_trace_str, Module.DeclAdapter{ .mod = mod }).?;
|
||||
const stack_trace_decl = mod.declPtr(stack_trace_decl_index);
|
||||
|
||||
return mod.declPtr(stack_trace_decl).val.toType(undefined);
|
||||
// Sema should have ensured that StackTrace was analyzed.
|
||||
assert(stack_trace_decl.has_tv);
|
||||
return stack_trace_decl.val.toType(undefined);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user