From e00d88d82efc5f3400b158a5f601ea6c73214442 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 30 Nov 2017 19:53:40 +0000 Subject: Fix issue #157 --- src/check_stmt.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/check_stmt.cpp') 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; } -- cgit v1.2.3