Add type is support

pull/335/head
Ibrahim Numanagić 2023-02-18 14:51:50 -08:00
parent 894bf5b375
commit 57881a8825
1 changed files with 2 additions and 0 deletions

View File

@ -569,6 +569,8 @@ ExprPtr TypecheckVisitor::transformBinaryIs(BinaryExpr *expr) {
unify(expr->type, ctx->getType("bool"));
return nullptr;
}
if (expr->lexpr->isType() && expr->rexpr->isType())
return transform(N<BoolExpr>(lc->realizedName() == rc->realizedName()));
if (!lc->getRecord() && !rc->getRecord()) {
// Both reference types: `return lhs.__raw__() == rhs.__raw__()`
return transform(