[FIR] Expand type of const val in FirConstPropertyChecker

This commit is contained in:
Dmitriy Novozhilov
2021-05-21 11:11:08 +03:00
committed by TeamCityServer
parent 669985f853
commit 478a512b24
7 changed files with 32 additions and 2 deletions
@@ -975,6 +975,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
public void testConstValWithGetterOrDelegate() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/constVal/constValWithGetterOrDelegate.kt");
}
@TestMetadata("constValWithTypealiasType.kt")
public void testConstValWithTypealiasType() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/constVal/constValWithTypealiasType.kt");
}
}
@TestMetadata("compiler/fir/analysis-tests/testData/resolve/constructors")
@@ -0,0 +1,4 @@
FILE: constValWithTypealiasType.kt
public final typealias Foo = R|kotlin/Int|
public final const val x: R|Foo| = Int(10)
public get(): R|Foo|
@@ -0,0 +1,3 @@
typealias Foo = Int
const val x: Foo = 10
@@ -1128,6 +1128,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest {
public void testConstValWithGetterOrDelegate() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/constVal/constValWithGetterOrDelegate.kt");
}
@Test
@TestMetadata("constValWithTypealiasType.kt")
public void testConstValWithTypealiasType() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/constVal/constValWithTypealiasType.kt");
}
}
@Nested
@@ -1128,6 +1128,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
public void testConstValWithGetterOrDelegate() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/constVal/constValWithGetterOrDelegate.kt");
}
@Test
@TestMetadata("constValWithTypealiasType.kt")
public void testConstValWithTypealiasType() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/constVal/constValWithTypealiasType.kt");
}
}
@Nested