Skip to content

Commit

Permalink
Fix core error when reflect_docs() is given one argument
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoKnight committed Aug 16, 2018
1 parent 5a470cd commit 0606442
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/com/laytonsmith/core/functions/Reflection.java
Expand Up @@ -295,6 +295,9 @@ public ParseTree optimizeDynamic(Target t, List<ParseTree> children, FileOptions
//and then it will never actually get called, so we handle it entirely in here.
return new ParseTree(new CString(docs(), t), null);
}
if(children.size() == 1) {
return null; // not enough arguments, so an exception will be thrown later
}
if(children.get(0).isConst()) {
//If it's a function, we can check to see if it actually exists,
//and make it a compile error if it doesn't, even if parameter 2 is dynamic
Expand Down

0 comments on commit 0606442

Please sign in to comment.