diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-05-20 09:35:11 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-10 20:47:53 -0700 |
| commit | 115c08956278b79c848e04c2f4eefca40e6cd8a3 (patch) | |
| tree | 8dfdced9bc1ba7499f7660e986bd82d0ae772347 /src/Module.zig | |
| parent | be78a12d7d5ac0a711fdf7237d7ccefba42be83c (diff) | |
| download | zig-115c08956278b79c848e04c2f4eefca40e6cd8a3.tar.gz zig-115c08956278b79c848e04c2f4eefca40e6cd8a3.zip | |
Value: add `intern` and `unintern` to facilitate code conversion
This allows some code (like struct initializers) to use interned types
while other code (such as comptime mutation) continues to use legacy
types.
With these changes, an `zig build-obj empty.zig` gets to a crash on
missing interned error union types.
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Module.zig b/src/Module.zig index 70b08ea3a9..dc9b9402bd 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -5762,7 +5762,7 @@ pub fn analyzeFnBody(mod: *Module, func: *Fn, arena: Allocator) SemaError!Air { // Crucially, this happens *after* we set the function state to success above, // so that dependencies on the function body will now be satisfied rather than // result in circular dependency errors. - sema.resolveFnTypes(fn_ty_info) catch |err| switch (err) { + sema.resolveFnTypes(mod.typeToFunc(fn_ty).?) catch |err| switch (err) { error.NeededSourceLocation => unreachable, error.GenericPoison => unreachable, error.ComptimeReturn => unreachable, |
