Skip to content

Commit 1c47d1a

Browse files
committed
Change closure varargs instanceof check to cached variant
1 parent fc9d669 commit 1c47d1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/laytonsmith/core/constructs/CClosure.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ protected void execute(Mixed... values) throws ConfigRuntimeException, ProgramFl
251251
isVarArg = true;
252252
}
253253
if(isVarArg) {
254-
if(!InstanceofUtil.isInstanceof(value, varargType, env)) {
254+
if(!InstanceofUtil.isInstanceof(value.typeof(), varargType.getVarargsBaseType(), env)) {
255255
throw new CRECastException("Expected type " + varargType + " but found " + value.typeof(),
256256
getTarget());
257257
}

0 commit comments

Comments
 (0)