FE1.0 Analysis API: get smartcast if available with getKtExpressionType

The current implementation still does not work with multicast. In
addition, it appears FE1.0 does not attempt smart cast if it's not used.
This commit is contained in:
Tianyu Geng
2021-12-07 15:19:05 -08:00
committed by teamcity
parent a5844b754e
commit 2f393cdd02
14 changed files with 102 additions and 2 deletions
@@ -156,6 +156,30 @@ public class FirHLExpressionTypeTestGenerated extends AbstractFirHLExpressionTyp
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/expressionType/returnExpression.kt");
}
@Test
@TestMetadata("smartcast_asCallArg.kt")
public void testSmartcast_asCallArg() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/expressionType/smartcast_asCallArg.kt");
}
@Test
@TestMetadata("smartcast_asReceiver.kt")
public void testSmartcast_asReceiver() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/expressionType/smartcast_asReceiver.kt");
}
@Test
@TestMetadata("smartcast_multi.kt")
public void testSmartcast_multi() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/expressionType/smartcast_multi.kt");
}
@Test
@TestMetadata("smartcast_unused.kt")
public void testSmartcast_unused() throws Exception {
runTest("analysis/analysis-api/testData/components/expressionTypeProvider/expressionType/smartcast_unused.kt");
}
@Test
@TestMetadata("stringLiteral.kt")
public void testStringLiteral() throws Exception {