Do not suggest "create abstract property" inside annotation

This commit is contained in:
Mikhail Glukhikh
2018-08-15 16:12:33 +03:00
parent 04675b4446
commit 9a9e703e80
2 changed files with 2 additions and 4 deletions
@@ -149,10 +149,9 @@ sealed class CreateCallableFromCallActionFactory<E : KtExpression>(
if (originalReceiverTypeInfo !is TypeInfo.ByType) return null
receiverTypeInfo = originalReceiverTypeInfo
receiverType = receiverTypeInfo.theType
}
else {
} else {
val containingClass = originalExpression.getStrictParentOfType<KtClassOrObject>() as? KtClass ?: return null
if (containingClass is KtEnumEntry) return null
if (containingClass is KtEnumEntry || containingClass.isAnnotation()) return null
receiverType = (containingClass.unsafeResolveToDescriptor() as ClassDescriptor).defaultType
receiverTypeInfo = TypeInfo(receiverType, Variance.IN_VARIANCE).ofThis()
}
@@ -1,5 +1,4 @@
// "Create local variable 'defaultPreferencesName'" "false"
// ACTION: Create abstract property 'defaultPreferencesName'
// ACTION: Create parameter 'defaultPreferencesName'
// ACTION: Create property 'defaultPreferencesName'
// ACTION: Rename reference