diff options
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 2cdeaf7e8..98798b75d 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -178,8 +178,12 @@ bool check_is_terminating(AstNode *node) { } Type *check_assignment_variable(Checker *c, Operand *lhs, Operand *rhs) { - if (rhs->mode == Addressing_Invalid || - (rhs->type == t_invalid && rhs->mode != Addressing_Overload)) { + if (rhs->mode == Addressing_Invalid) { + return nullptr; + } + if (rhs->type == t_invalid && + rhs->mode != Addressing_Overload && + rhs->mode != Addressing_Builtin) { return nullptr; } |