Skip to content

Commit b453858

Browse files
authored
fix(compiler): propagate Any type through inst built-in function (#133)
1 parent ef176e6 commit b453858

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/compiler/src/compile.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,10 +1620,10 @@ impl<'a> AstTransformer for VarIdTyPass<'a> {
16201620
);
16211621
if let Some(ty) = args.posargs.first() {
16221622
self.assert_ty_is_cell(ty.span(), &ty.ty());
1623-
if let Ty::Cell(c) = ty.ty() {
1624-
(None, Ty::Inst(c.clone()))
1625-
} else {
1626-
(None, Ty::Unknown)
1623+
match ty.ty() {
1624+
Ty::Cell(c) => (None, Ty::Inst(c.clone())),
1625+
Ty::Any => (None, Ty::Any),
1626+
_ => (None, Ty::Unknown),
16271627
}
16281628
} else {
16291629
(None, Ty::Unknown)

0 commit comments

Comments
 (0)