[AA] an expression in delegated super entry is used as expression
^KT-65665 fixed
This commit is contained in:
+6
@@ -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 {
|
||||
|
||||
+3
@@ -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 ->
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
interface I
|
||||
class Delegating : I by <expr>compoundDelegate()</expr>
|
||||
fun compoundDelegate(): I {
|
||||
return object : I {}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
expression: CALL_EXPRESSION
|
||||
text: compoundDelegate()
|
||||
isUsedAsExpression: true
|
||||
Reference in New Issue
Block a user