| ... | @@ -483,10 +483,10 @@ pub const Value = struct { | ... | @@ -483,10 +483,10 @@ pub const Value = struct { |
| 483 | } | 483 | } |
| 484 | | 484 | |
| 485 | pub fn getFunction(val: Value, mod: *Module) ?InternPool.Key.Func { | 485 | pub fn getFunction(val: Value, mod: *Module) ?InternPool.Key.Func { |
| 486 | return switch (mod.intern_pool.indexToKey(val.toIntern())) { | 486 | return if (val.ip_index != .none) switch (mod.intern_pool.indexToKey(val.toIntern())) { |
| 487 | .func => |x| x, | 487 | .func => |x| x, |
| 488 | else => null, | 488 | else => null, |
| 489 | }; | 489 | } else null; |
| 490 | } | 490 | } |
| 491 | | 491 | |
| 492 | pub fn getExternFunc(val: Value, mod: *Module) ?InternPool.Key.ExternFunc { | 492 | pub fn getExternFunc(val: Value, mod: *Module) ?InternPool.Key.ExternFunc { |