aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-03-23 23:28:05 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-03-23 23:28:05 -0700
commit2af69710a7b1513f3540ae0e1178cb5f3948204d (patch)
tree9f8aa5fd7d80ec976a5355348e7b3a6347caf1b5 /src/Module.zig
parentaca42c62598523b92de7a51d3d84f2f2e5146536 (diff)
downloadzig-2af69710a7b1513f3540ae0e1178cb5f3948204d.tar.gz
zig-2af69710a7b1513f3540ae0e1178cb5f3948204d.zip
stage2: fix some generics issues
* std.meta: correct use of `default_value` in reification. stage1 accepted a wrong type for `null`. * Sema: after instantiating a generic function, if the return type ends up being a comptime-known type, then we return an error, undoing the generic function instantiation, and making a comptime function call instead. - We also needed to clean up the dependency graph in this case. * Sema: reified enums set tag_ty_inferred to false since an integer tag type is provided. This is a limitation of the `@Type` builtin which will be addressed with #10710. * Sema: fix resolveInferredErrorSet incorrectly calling ensureFuncBodyAnalyzed on generic functions.
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Module.zig b/src/Module.zig
index 79d6343949..0666936f1f 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -781,11 +781,11 @@ pub const Decl = struct {
return &decl_plus_emit_h.emit_h;
}
- fn removeDependant(decl: *Decl, other: *Decl) void {
+ pub fn removeDependant(decl: *Decl, other: *Decl) void {
assert(decl.dependants.swapRemove(other));
}
- fn removeDependency(decl: *Decl, other: *Decl) void {
+ pub fn removeDependency(decl: *Decl, other: *Decl) void {
assert(decl.dependencies.swapRemove(other));
}