Fix false positive for HasPlatformType with member extension on 'dynamic'
#KT-29812 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
1594c1fc6b
commit
0f45e3d238
@@ -99,6 +99,7 @@ class SpecifyTypeExplicitlyIntention : SelfTargetingRangeIntention<KtCallableDec
|
||||
val callable = declaration.resolveToDescriptorIfAny() as? CallableDescriptor ?: return null
|
||||
if (publicAPIOnly && !callable.visibility.isPublicAPI) return null
|
||||
val type = callable.returnType ?: return null
|
||||
if (type.isDynamic()) return null
|
||||
if (reportPlatformArguments) {
|
||||
if (!type.isFlexibleRecursive()) return null
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
class C {
|
||||
operator fun dynamic.plus(x: Any?) = this
|
||||
}
|
||||
Reference in New Issue
Block a user