Implement hack to support both remove() and removeAt() in MutableList<Int>
Also add couple of tests about CharSequence.get
This commit is contained in:
@@ -934,6 +934,7 @@ public class JetTypeMapper {
|
||||
}
|
||||
|
||||
for (ValueParameterDescriptor parameter : valueParameters) {
|
||||
if (writeCustomParameter(f, parameter, sw)) continue;
|
||||
writeParameter(sw, parameter.getType());
|
||||
}
|
||||
|
||||
@@ -957,6 +958,23 @@ public class JetTypeMapper {
|
||||
return signature;
|
||||
}
|
||||
|
||||
private boolean writeCustomParameter(
|
||||
@NotNull FunctionDescriptor f,
|
||||
@NotNull ValueParameterDescriptor parameter,
|
||||
@NotNull BothSignatureWriter sw
|
||||
) {
|
||||
FunctionDescriptor overridden = BuiltinsPropertiesUtilKt.getOverriddenBuiltinFunctionWithErasedValueParametersInJava(f);
|
||||
if (overridden == null) return false;
|
||||
if (BuiltinsPropertiesUtilKt.isFromJavaOrBuiltins(f)) return false;
|
||||
|
||||
if (overridden.getName().asString().equals("remove") && mapType(parameter.getType()).getSort() == Type.INT) {
|
||||
writeParameter(sw, TypeUtils.makeNullable(parameter.getType()));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static String getDefaultDescriptor(@NotNull Method method, @Nullable String dispatchReceiverDescriptor, boolean isExtension) {
|
||||
String descriptor = method.getDescriptor();
|
||||
|
||||
Reference in New Issue
Block a user