Fix false positive for HasPlatformType with member extension on 'dynamic'

#KT-29812 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-03-05 10:19:10 +09:00
committed by Mikhail Glukhikh
parent 1594c1fc6b
commit 0f45e3d238
2 changed files with 4 additions and 0 deletions
@@ -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
}