Skip to content

Commit d467e15

Browse files
committed
easy to fix
1 parent 08ccdec commit d467e15

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

SRC/typecheck-infer-expr.lsts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ let std-infer-expr(tctx: Maybe<TypeContext>, term: AST, is-scoped: Bool, used: I
173173
};
174174
if non-zero(term-phi-id) and term-phi-id != t-phi-id then tctx = tctx.phi-move(typeof-term(t), t);
175175
if non-zero(term-phi-id) and term-phi-id != f-phi-id then tctx = tctx.phi-move(typeof-term(f), f);
176+
if (typeof-term(term).is-t(c"Nil",0) or typeof-term(term).is-t(c"Never",0)) and non-zero(t-phi-id) then tctx = tctx.phi-move(typeof-term(t), t);
177+
if (typeof-term(term).is-t(c"Nil",0) or typeof-term(term).is-t(c"Never",0)) and non-zero(f-phi-id) then tctx = tctx.phi-move(typeof-term(f), f);
176178
}
177179
);
178180
ASTEOF{} => tctx = tctx.ascript(term, t0(c"Nil"));

0 commit comments

Comments
 (0)