summaryrefslogtreecommitdiff
path: root/src/ast/nodes/ArglistNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/nodes/ArglistNode.java')
-rw-r--r--src/ast/nodes/ArglistNode.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ast/nodes/ArglistNode.java b/src/ast/nodes/ArglistNode.java
index 78b4ca7..983d150 100644
--- a/src/ast/nodes/ArglistNode.java
+++ b/src/ast/nodes/ArglistNode.java
@@ -3,7 +3,6 @@ package ast.nodes;
import ast.types.*;
import java.util.ArrayList;
import java.util.Arrays;
-
import semanticanalysis.SemanticError;
import semanticanalysis.SymbolTable;
@@ -37,8 +36,8 @@ public class ArglistNode implements Node {
continue;
}
- if (!ST.top_lookup(argName) && argExpr.typeCheck() instanceof AtomType) {
- errors.add(new SemanticError("'" + argName + "' is not defined."));
+ if (ST.nslookup(argName) < 0 && argExpr.typeCheck() instanceof AtomType) {
+ errors.add(new SemanticError("name '" + argName + "' is not defined."));
}
} else {
errors.addAll(arg.checkSemantics(ST, _nesting));