[AA] an expression in delegated super entry is used as expression

^KT-65665 fixed
This commit is contained in:
Anna Kozlova
2024-02-12 11:16:48 +01:00
committed by Space Team
parent 7702374dbd
commit 932ad3e2c1
7 changed files with 35 additions and 0 deletions
@@ -676,6 +676,12 @@ public class Fe10IdeNormalAnalysisSourceModuleIsUsedAsExpressionTestGenerated ex
runTest("analysis/analysis-api/testData/components/expressionInfoProvider/isUsedAsExpression/default_parameter.kt");
}
@Test
@TestMetadata("delegatedSuperEntry.kt")
public void testDelegatedSuperEntry() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionInfoProvider/isUsedAsExpression/delegatedSuperEntry.kt");
}
@Test
@TestMetadata("destructuringDecl.kt")
public void testDestructuringDecl() throws Exception {
@@ -130,6 +130,9 @@ internal class KtFirExpressionInfoProvider(
is KtValueArgument ->
parent.getArgumentExpression() == child
is KtDelegatedSuperTypeEntry ->
parent.delegateExpression == child
// KtContainerNode are containers used in `KtIfExpressions`, and should be regarded
// as parentheses for the purpose of this analysis.
is KtContainerNode ->
@@ -676,6 +676,12 @@ public class FirIdeDependentAnalysisSourceModuleIsUsedAsExpressionTestGenerated
runTest("analysis/analysis-api/testData/components/expressionInfoProvider/isUsedAsExpression/default_parameter.kt");
}
@Test
@TestMetadata("delegatedSuperEntry.kt")
public void testDelegatedSuperEntry() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionInfoProvider/isUsedAsExpression/delegatedSuperEntry.kt");
}
@Test
@TestMetadata("destructuringDecl.kt")
public void testDestructuringDecl() throws Exception {
@@ -676,6 +676,12 @@ public class FirIdeNormalAnalysisSourceModuleIsUsedAsExpressionTestGenerated ext
runTest("analysis/analysis-api/testData/components/expressionInfoProvider/isUsedAsExpression/default_parameter.kt");
}
@Test
@TestMetadata("delegatedSuperEntry.kt")
public void testDelegatedSuperEntry() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionInfoProvider/isUsedAsExpression/delegatedSuperEntry.kt");
}
@Test
@TestMetadata("destructuringDecl.kt")
public void testDestructuringDecl() throws Exception {
@@ -676,6 +676,12 @@ public class FirStandaloneNormalAnalysisSourceModuleIsUsedAsExpressionTestGenera
runTest("analysis/analysis-api/testData/components/expressionInfoProvider/isUsedAsExpression/default_parameter.kt");
}
@Test
@TestMetadata("delegatedSuperEntry.kt")
public void testDelegatedSuperEntry() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionInfoProvider/isUsedAsExpression/delegatedSuperEntry.kt");
}
@Test
@TestMetadata("destructuringDecl.kt")
public void testDestructuringDecl() throws Exception {
@@ -0,0 +1,5 @@
interface I
class Delegating : I by <expr>compoundDelegate()</expr>
fun compoundDelegate(): I {
return object : I {}
}
@@ -0,0 +1,3 @@
expression: CALL_EXPRESSION
text: compoundDelegate()
isUsedAsExpression: true