Do not use inline-only in java
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.load.java;
|
package org.jetbrains.kotlin.load.java;
|
||||||
|
|
||||||
import kotlin.text.StringsKt;
|
import kotlin.text.Regex;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor;
|
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor;
|
||||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor;
|
import org.jetbrains.kotlin.descriptors.ClassDescriptor;
|
||||||
@@ -53,6 +53,8 @@ public final class JvmAbi {
|
|||||||
public static final String LOCAL_VARIABLE_NAME_PREFIX_INLINE_ARGUMENT = "$i$a$";
|
public static final String LOCAL_VARIABLE_NAME_PREFIX_INLINE_ARGUMENT = "$i$a$";
|
||||||
public static final String LOCAL_VARIABLE_NAME_PREFIX_INLINE_FUNCTION = "$i$f$";
|
public static final String LOCAL_VARIABLE_NAME_PREFIX_INLINE_FUNCTION = "$i$f$";
|
||||||
|
|
||||||
|
private static final Regex SANITIZE_AS_JAVA_INVALID_CHARACTERS = new Regex("[^\\p{L}\\p{Digit}]");
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public static String getSyntheticMethodNameForAnnotatedProperty(@NotNull Name propertyName) {
|
public static String getSyntheticMethodNameForAnnotatedProperty(@NotNull Name propertyName) {
|
||||||
return propertyName.asString() + ANNOTATED_PROPERTY_METHOD_NAME_SUFFIX;
|
return propertyName.asString() + ANNOTATED_PROPERTY_METHOD_NAME_SUFFIX;
|
||||||
@@ -90,7 +92,7 @@ public final class JvmAbi {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public static String sanitizeAsJavaIdentifier(@NotNull String str) {
|
public static String sanitizeAsJavaIdentifier(@NotNull String str) {
|
||||||
return StringsKt.replace(str, StringsKt.toRegex("[^\\p{L}\\p{Digit}]"), "_");
|
return SANITIZE_AS_JAVA_INVALID_CHARACTERS.replace(str, "_");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isPropertyWithBackingFieldInOuterClass(@NotNull PropertyDescriptor propertyDescriptor) {
|
public static boolean isPropertyWithBackingFieldInOuterClass(@NotNull PropertyDescriptor propertyDescriptor) {
|
||||||
|
|||||||
@@ -143,13 +143,13 @@ public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzer
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
final TestFile afterFile = CollectionsKt.find(subFiles, new Function1<TestFile, Boolean>() {
|
final TestFile afterFile = CollectionsKt.firstOrNull(subFiles, new Function1<TestFile, Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
public Boolean invoke(TestFile file) {
|
public Boolean invoke(TestFile file) {
|
||||||
return file.name.contains(".after");
|
return file.name.contains(".after");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
final TestFile beforeFile = CollectionsKt.find(subFiles, new Function1<TestFile, Boolean>() {
|
final TestFile beforeFile = CollectionsKt.firstOrNull(subFiles, new Function1<TestFile, Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
public Boolean invoke(TestFile file) {
|
public Boolean invoke(TestFile file) {
|
||||||
return file.name.contains(".before");
|
return file.name.contains(".before");
|
||||||
|
|||||||
Reference in New Issue
Block a user