Fix bug with binop assignment typechecking
This commit is contained in:
parent
1814ce2cc9
commit
c8d4b653da
@ -99,6 +99,8 @@ namespace AST {
|
||||
auto rhs_ty = this->m_rhs->typecheck(state, scope, {});
|
||||
|
||||
if (this->m_binop == types::BinOp::Assignment) {
|
||||
// Re-typecheck rhs to actually match lhs
|
||||
auto rhs_ty = this->m_rhs->typecheck(state, scope, lhs_ty);
|
||||
return lhs_ty;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user