aboutsummaryrefslogtreecommitdiff
path: root/src/check_stmt.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-11-30 19:53:40 +0000
committergingerBill <bill@gingerbill.org>2017-11-30 19:53:40 +0000
commite00d88d82efc5f3400b158a5f601ea6c73214442 (patch)
tree8d51ebfcba06a66221e53ea49f0b8ddf8bbf9073 /src/check_stmt.cpp
parent04cce1826b649e4780e4673f68f9f5e5299f5aaf (diff)
Fix issue #157
Diffstat (limited to 'src/check_stmt.cpp')
-rw-r--r--src/check_stmt.cpp8
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;
}