diff --git a/src/relay/pass/type_infer.cc b/src/relay/pass/type_infer.cc index 207600a5f760c..b3a9c630de2e9 100644 --- a/src/relay/pass/type_infer.cc +++ b/src/relay/pass/type_infer.cc @@ -518,7 +518,7 @@ class TypeInferencer::Resolver : public ExprMutator, PatternMutator { } Expr VisitExpr_(const ConstructorNode* op) final { - return AttachCheckedType(op); + return GetRef(op); } Expr VisitExpr_(const MatchNode* op) final { @@ -657,6 +657,7 @@ struct AllCheckTypePopulated : ExprVisitor { void VisitExpr(const Expr& e) { if (e.as()) { return; } if (e.as()) { return; } + if (e.as()) { return; } CHECK(e->checked_type_.defined()) << "Expression: " << e; return ExprVisitor::VisitExpr(e); }