Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ajreynol committed Jan 24, 2025
1 parent 15c4873 commit d4c7f5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -919,11 +919,12 @@ Expr State::mkExpr(Kind k, const std::vector<Expr>& children)
else if (k==Kind::AS_RETURN)
{
// (as nil (List Int)) --> (_ nil (List Int))
if (getConstructorKind(vchildren[0]) == Attr::AMB_DATATYPE_CONSTRUCTOR)
if (getConstructorKind(vchildren[0]) == Attr::AMB_DATATYPE_CONSTRUCTOR && children.size()==2)
{
Trace("overload") << "...type arg for ambiguous constructor" << std::endl;
return mkExpr(Kind::APPLY_OPAQUE, {children[0], children[1]});
}
// note we don't support other uses of `as` for symbol disambiguation yet
}
else if (k==Kind::AS)
{
Expand Down

0 comments on commit d4c7f5a

Please sign in to comment.