aboutsummaryrefslogtreecommitdiff
path: root/src/InternPool.zig
diff options
context:
space:
mode:
authorDavid Rubin <daviru007@icloud.com>2024-07-16 18:46:31 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-07-21 01:00:49 -0700
commit7591df5172e9f8e80130b619b7eaa60846d3e851 (patch)
tree594c4abce2d54638c4d2c8b402d3ed3e520bfb81 /src/InternPool.zig
parent9232425b8f68e84d192c9c77ca0c3b7b2547d195 (diff)
downloadzig-7591df5172e9f8e80130b619b7eaa60846d3e851.tar.gz
zig-7591df5172e9f8e80130b619b7eaa60846d3e851.zip
ip: use `getExternFunc` in `getCoerced`
`ip.get` specifically doesn't allow `extern_func` keys to access it.
Diffstat (limited to 'src/InternPool.zig')
-rw-r--r--src/InternPool.zig5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig
index 12492e0502..c3cee5852b 100644
--- a/src/InternPool.zig
+++ b/src/InternPool.zig
@@ -9433,12 +9433,11 @@ pub fn getCoerced(
switch (ip.indexToKey(val)) {
.undef => return ip.get(gpa, tid, .{ .undef = new_ty }),
.extern_func => |extern_func| if (ip.isFunctionType(new_ty))
- return ip.get(gpa, tid, .{ .extern_func = .{
+ return ip.getExternFunc(gpa, tid, .{
.ty = new_ty,
.decl = extern_func.decl,
.lib_name = extern_func.lib_name,
- } }),
-
+ }),
.func => unreachable,
.int => |int| switch (ip.indexToKey(new_ty)) {