Skip to content

Commit f8472ad

Browse files
committed
Fix procedure arguments not being typechecked
1 parent 49c957f commit f8472ad

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/main/java/com/laytonsmith/core/compiler/analysis/StaticAnalysis.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,13 @@ public CClassType typecheck(ParseTree ast, Environment env, Set<ConfigCompileExc
373373
}
374374
return CClassType.AUTO; // Unknown return type.
375375
} else if(cFunc.hasProcedure()) { // The function is a procedure reference.
376+
377+
// Type check procedure arguments.
378+
for(ParseTree child : ast.getChildren()) {
379+
this.typecheck(child, env, exceptions);
380+
}
381+
382+
// Return procedure return type.
376383
String procName = cFunc.val();
377384
Scope scope = this.getTermScope(ast);
378385
if(scope != null) {

0 commit comments

Comments
 (0)