[NI] Report diagnostic about receiver as super expression

This commit is contained in:
Mikhail Zarechenskiy
2017-10-27 13:15:08 +03:00
parent 1d6e9c244b
commit f51f7a0fe4
4 changed files with 21 additions and 3 deletions
@@ -89,6 +89,13 @@ class DiagnosticReporterByTrackingStrategy(
val implicitInvokeCheck = (callReceiver as? ReceiverExpressionKotlinCallArgument)?.isVariableReceiverForInvoke ?: false
tracingStrategy.unsafeCall(trace, callReceiver.receiver.receiverValue.type, implicitInvokeCheck)
}
SuperAsExtensionReceiver::class.java -> {
val psiExpression = callReceiver.psiExpression
if (psiExpression is KtSuperExpression) {
trace.report(SUPER_CANT_BE_EXTENSION_RECEIVER.on(psiExpression, psiExpression.text))
}
}
}
}