summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2024-06-27 22:24:43 +0200
committerSanto Cariotti <santo@dcariotti.me>2024-06-27 22:24:43 +0200
commit259580d38338ef53e6f98b2b279d1d4aa8ecff04 (patch)
tree9bce99a5bbdefd692cfc1023bf2cc168d3efc47b
parent3f29e5101d9c6e670dd05715297f2060707dc6c7 (diff)
Remove semantic error for `'x' is not a function`
It's useless
-rw-r--r--src/ast/nodes/ExprNode.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/ast/nodes/ExprNode.java b/src/ast/nodes/ExprNode.java
index 781cc76..591ee37 100644
--- a/src/ast/nodes/ExprNode.java
+++ b/src/ast/nodes/ExprNode.java
@@ -62,12 +62,8 @@ public class ExprNode implements Node {
if (fun != null && !(fun.getType() instanceof ImportType)) {
if (!(fun.getType() instanceof FunctionType)) {
- if (trailer.isParenthesis()) {
- errors.add(new SemanticError("'" + funName + "' is not a function."));
- } else {
- for (var t : trailers) {
- errors.addAll(t.checkSemantics(ST, _nesting));
- }
+ for (var t : trailers) {
+ errors.addAll(t.checkSemantics(ST, _nesting));
}
} else {
FunctionType ft = (FunctionType) fun.getType();