Automatically put 'operator' modifier on appropriate Java methods
This commit is contained in:
+2
-6
@@ -170,9 +170,7 @@ public class SingleAbstractMethodUtils {
|
||||
Arrays.asList(parameter),
|
||||
returnType,
|
||||
Modality.FINAL,
|
||||
samInterface.getVisibility(),
|
||||
false,
|
||||
false
|
||||
samInterface.getVisibility()
|
||||
);
|
||||
|
||||
return result;
|
||||
@@ -208,9 +206,7 @@ public class SingleAbstractMethodUtils {
|
||||
valueParameters,
|
||||
returnType,
|
||||
Modality.FINAL,
|
||||
original.getVisibility(),
|
||||
false,
|
||||
false
|
||||
original.getVisibility()
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
+2
-1
@@ -30,6 +30,7 @@ import org.jetbrains.kotlin.serialization.deserialization.findClassAcrossModuleD
|
||||
import org.jetbrains.kotlin.storage.StorageManager
|
||||
import org.jetbrains.kotlin.types.expressions.OperatorConventions
|
||||
import org.jetbrains.kotlin.storage.get
|
||||
import org.jetbrains.kotlin.util.OperatorNameConventions
|
||||
|
||||
/**
|
||||
* If there's no Kotlin reflection implementation found in the classpath, checks that there are no usages
|
||||
@@ -58,7 +59,7 @@ class ReflectionAPICallChecker(private val module: ModuleDescriptor, storageMana
|
||||
// - 'get'/'set' on properties
|
||||
val name = descriptor.getName()
|
||||
when {
|
||||
name == OperatorConventions.INVOKE -> return
|
||||
name == OperatorNameConventions.INVOKE -> return
|
||||
name.asString() == "name" -> return
|
||||
(name.asString() == "get" || name.asString() == "set") &&
|
||||
kPropertyClasses.any { kProperty -> DescriptorUtils.isSubclass(containingClass, kProperty) } -> return
|
||||
|
||||
+1
-3
@@ -116,9 +116,7 @@ public class SignaturesPropagationData {
|
||||
autoValueParameters,
|
||||
autoReturnType,
|
||||
Modality.OPEN,
|
||||
Visibilities.PUBLIC,
|
||||
false,
|
||||
false
|
||||
Visibilities.PUBLIC
|
||||
);
|
||||
return autoMethodDescriptor;
|
||||
}
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ class SamAdapterFunctionsScope(storageManager: StorageManager) : JetScope by Jet
|
||||
val visibility = syntheticExtensionVisibility(sourceFunction)
|
||||
|
||||
descriptor.initialize(receiverType, null, typeParameters, valueParameters, returnType,
|
||||
Modality.FINAL, visibility, false, false)
|
||||
Modality.FINAL, visibility)
|
||||
|
||||
return descriptor
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user