Don't show disambiguation for "Show expression type" on "this"
#KT-17840 Fixed
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user