Copy to interface just companion object public const properties
This commit is contained in:
@@ -352,7 +352,7 @@ class KotlinEvaluator(val codeFragment: JetCodeFragment,
|
||||
|
||||
val (bindingContext, moduleDescriptor, files) = jetFile.checkForErrors(true)
|
||||
|
||||
val generateClassFilter = object : GenerationState.GenerateClassFilter {
|
||||
val generateClassFilter = object : GenerationState.GenerateClassFilter() {
|
||||
override fun shouldGeneratePackagePart(file: JetFile) = file == jetFile
|
||||
override fun shouldAnnotateClass(classOrObject: JetClassOrObject) = true
|
||||
override fun shouldGenerateClass(classOrObject: JetClassOrObject) = classOrObject.getContainingJetFile() == jetFile
|
||||
|
||||
@@ -102,7 +102,7 @@ public class JetAnonymousSuperMacro extends Macro {
|
||||
|
||||
List<PsiNamedElement> result = new ArrayList<PsiNamedElement>();
|
||||
|
||||
for (DeclarationDescriptor descriptor : scope.getDescriptors(DescriptorKindFilter.NON_SINGLETON_CLASSIFIERS, JetScope.ALL_NAME_FILTER)) {
|
||||
for (DeclarationDescriptor descriptor : scope.getDescriptors(DescriptorKindFilter.NON_SINGLETON_CLASSIFIERS, JetScope.Companion.getALL_NAME_FILTER())) {
|
||||
if (!(descriptor instanceof ClassDescriptor)) continue;
|
||||
ClassDescriptor classDescriptor = (ClassDescriptor) descriptor;
|
||||
if (!classDescriptor.getModality().isOverridable()) continue;
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ package server
|
||||
|
||||
interface Some {
|
||||
companion object {
|
||||
val <caret>XX = 1
|
||||
const val <caret>XX = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ public object KotlinObject {
|
||||
|
||||
public interface StaticFieldInClassObjectInTrait {
|
||||
companion object {
|
||||
public val XX: String = "xx"
|
||||
public const val XX: String = "xx"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user