From c71b0eea2fa1059014b5875710a408637faa8cc6 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Mon, 30 Jan 2017 06:07:52 +0100 Subject: [PATCH] Fix error type on non-var global identifier in expression. The error message should be EParseUndefined, not EParseTypeMismatch. --- lslopt/lslparse.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lslopt/lslparse.py b/lslopt/lslparse.py index 52e18fb..b3a9d97 100644 --- a/lslopt/lslparse.py +++ b/lslopt/lslparse.py @@ -913,11 +913,9 @@ class parser(object): return {'nt':'FNCALL', 't':sym['Type'], 'name':name, 'ch':args} sym = self.FindSymbolFull(val) - if sym is None: + if sym is None or sym['Kind'] != 'v': raise EParseUndefined(self) - if sym['Kind'] != 'v': - raise EParseTypeMismatch(self) typ = sym['Type'] lvalue = {'nt':'IDENT', 't':typ, 'name':name, 'scope':sym['Scope']}