Don't show disambiguation for "Show expression type" on "this"

#KT-17840 Fixed
This commit is contained in:
Dmitry Jemerov
2017-05-16 16:22:29 +02:00
parent 2cbb8d03c0
commit af043843b7
3 changed files with 12 additions and 0 deletions
@@ -74,6 +74,7 @@ class KotlinExpressionTypeProvider : ExpressionTypeProvider<KtExpression>() {
is KtIfExpression, is KtWhenExpression, is KtTryExpression -> shouldShowStatementType()
is KtLoopExpression -> false
is KtConstantExpression -> false
is KtThisExpression -> false
else -> getQualifiedExpressionForSelector() == null && parent !is KtCallableReferenceExpression && !isFunctionCallee()
}
@@ -0,0 +1,5 @@
val x = 1.apply {
th<caret>is
}
// TYPE: this -> <html>Int</html>
@@ -126,6 +126,12 @@ public class ExpressionTypeTestGenerated extends AbstractExpressionTypeTest {
doTest(fileName);
}
@TestMetadata("ThisInLambda.kt")
public void testThisInLambda() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/ThisInLambda.kt");
doTest(fileName);
}
@TestMetadata("VariableDeclaration.kt")
public void testVariableDeclaration() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/VariableDeclaration.kt");