Browse Source

Fix error reporting for assignment to a built-in procedure (#183)

gingerBill 7 years ago
parent
commit
8f913c656c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/check_stmt.cpp

+ 3 - 1
src/check_stmt.cpp

@@ -203,7 +203,9 @@ Type *check_assignment_variable(Checker *c, Operand *lhs, Operand *rhs) {
 	bool used = false;
 	bool used = false;
 
 
 	if (lhs->mode == Addressing_Invalid ||
 	if (lhs->mode == Addressing_Invalid ||
-	    (lhs->type == t_invalid && lhs->mode != Addressing_ProcGroup)) {
+	    (lhs->type == t_invalid &&
+	     lhs->mode != Addressing_ProcGroup &&
+	     lhs->mode != Addressing_Builtin)) {
 		return nullptr;
 		return nullptr;
 	}
 	}