Skip to content

Commit

Permalink
Fix procedure arguments not being typechecked
Browse files Browse the repository at this point in the history
  • Loading branch information
Pieter12345 committed Mar 15, 2024
1 parent 49c957f commit f8472ad
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,13 @@ public CClassType typecheck(ParseTree ast, Environment env, Set<ConfigCompileExc
}
return CClassType.AUTO; // Unknown return type.
} else if(cFunc.hasProcedure()) { // The function is a procedure reference.

// Type check procedure arguments.
for(ParseTree child : ast.getChildren()) {
this.typecheck(child, env, exceptions);
}

// Return procedure return type.
String procName = cFunc.val();
Scope scope = this.getTermScope(ast);
if(scope != null) {
Expand Down

0 comments on commit f8472ad

Please sign in to comment.