Merge pull request #19333 from Vexu/fixes

Miscellaneous error fixes
This commit is contained in:
Andrew Kelley
2024-03-17 15:26:55 -07:00
committed by GitHub
7 changed files with 187 additions and 150 deletions

View File

@@ -2852,7 +2852,7 @@ pub const Object = struct {
const stack_trace_str = try mod.intern_pool.getOrPutString(mod.gpa, "StackTrace");
// buffer is only used for int_type, `builtin` is a struct.
const builtin_ty = mod.declPtr(builtin_decl).val.toType();
const builtin_namespace = builtin_ty.getNamespace(mod).?;
const builtin_namespace = mod.namespacePtrUnwrap(builtin_ty.getNamespaceIndex(mod)).?;
const stack_trace_decl_index = builtin_namespace.decls.getKeyAdapted(stack_trace_str, Module.DeclAdapter{ .zcu = mod }).?;
const stack_trace_decl = mod.declPtr(stack_trace_decl_index);