correctly calculate the number of mask arguments required for a method with default arguments

#KT-6816 Fixed
This commit is contained in:
Dmitry Jemerov
2015-03-27 15:53:55 +01:00
parent 418034add3
commit 1e536af87e
3 changed files with 32 additions and 1 deletions
@@ -708,7 +708,7 @@ public class JetTypeMapper {
@NotNull
public static String getDefaultDescriptor(@NotNull Method method, boolean isExtension) {
String descriptor = method.getDescriptor();
int argumentsCount = (Type.getArgumentsAndReturnSizes(descriptor) >> 2) - 1;
int argumentsCount = Type.getArgumentTypes(descriptor).length;
if (isExtension) {
argumentsCount--;
}