Fix assert on parameter type length for functions with big arity

In case of a bridge for a vararg invoke with big arity, the bridge only
has one parameter (array of parameters), and the delegate method has at
least 23 parameters. This assert was added in 77959247d2 and it didn't
cause any tests in master to fail because tests on functions with big
arity are disabled there
This commit is contained in:
Alexander Udalov
2018-07-20 13:44:33 +02:00
parent 6dacd1011f
commit ad326f7875
@@ -297,9 +297,10 @@ public class ClosureCodegen extends MemberCodegen<KtElement> {
"Vararg invoke must have one parameter of type [Ljava/lang/Object;: " + bridge;
generateVarargInvokeArityAssert(iv, delegate.getArgumentTypes().length);
}
assert bridgeParameterTypes.length == bridgeParameterKotlinTypes.size() :
"Asm parameter types should be the same length as Kotlin parameter types";
else {
assert bridgeParameterTypes.length == bridgeParameterKotlinTypes.size() :
"Asm parameter types should be the same length as Kotlin parameter types";
}
iv.load(0, asmType);