[Test] Add test for KT-54668
This commit is contained in:
committed by
Space Team
parent
f2cc5310b9
commit
bc9bc26cc8
+6
@@ -3467,6 +3467,12 @@ public class DiagnosisCompilerFirTestdataTestGenerated extends AbstractDiagnosis
|
|||||||
runTest("compiler/fir/analysis-tests/testData/resolve/properties/kotlinOverridesJavaComplex.kt");
|
runTest("compiler/fir/analysis-tests/testData/resolve/properties/kotlinOverridesJavaComplex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("lazyValWithElvisToNothingInside.kt")
|
||||||
|
public void testLazyValWithElvisToNothingInside() throws Exception {
|
||||||
|
runTest("compiler/fir/analysis-tests/testData/resolve/properties/lazyValWithElvisToNothingInside.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("noBackingFieldForExtension.kt")
|
@TestMetadata("noBackingFieldForExtension.kt")
|
||||||
public void testNoBackingFieldForExtension() throws Exception {
|
public void testNoBackingFieldForExtension() throws Exception {
|
||||||
|
|||||||
+5
@@ -3055,6 +3055,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
|||||||
runTest("compiler/fir/analysis-tests/testData/resolve/properties/kotlinOverridesJavaComplex.kt");
|
runTest("compiler/fir/analysis-tests/testData/resolve/properties/kotlinOverridesJavaComplex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lazyValWithElvisToNothingInside.kt")
|
||||||
|
public void testLazyValWithElvisToNothingInside() throws Exception {
|
||||||
|
runTest("compiler/fir/analysis-tests/testData/resolve/properties/lazyValWithElvisToNothingInside.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("noBackingFieldForExtension.kt")
|
@TestMetadata("noBackingFieldForExtension.kt")
|
||||||
public void testNoBackingFieldForExtension() throws Exception {
|
public void testNoBackingFieldForExtension() throws Exception {
|
||||||
runTest("compiler/fir/analysis-tests/testData/resolve/properties/noBackingFieldForExtension.kt");
|
runTest("compiler/fir/analysis-tests/testData/resolve/properties/noBackingFieldForExtension.kt");
|
||||||
|
|||||||
Vendored
+19
@@ -0,0 +1,19 @@
|
|||||||
|
FILE: lazyValWithElvisToNothingInside.kt
|
||||||
|
public abstract interface A : R|kotlin/Any| {
|
||||||
|
public abstract val list: R|kotlin/collections/List<kotlin/String>|
|
||||||
|
public get(): R|kotlin/collections/List<kotlin/String>|
|
||||||
|
|
||||||
|
}
|
||||||
|
public final fun getA(): R|A?| {
|
||||||
|
^getA Null(null)
|
||||||
|
}
|
||||||
|
public final val x: R|kotlin/collections/Map<kotlin/String, kotlin/String>|by R|kotlin/lazy|<R|kotlin/collections/Map<kotlin/String, kotlin/String>|>(<L> = lazy@fun <anonymous>(): R|kotlin/collections/Map<kotlin/String, kotlin/String>| <inline=NoInline> {
|
||||||
|
^ R|/getA|() ?: R|kotlin/error|(String(error)).R|/A.list|.R|kotlin/collections/associateBy|<R|kotlin/String|, R|kotlin/String|>(<L> = associateBy@fun <anonymous>(it: R|kotlin/String|): R|kotlin/String| <inline=Inline, kind=UNKNOWN> {
|
||||||
|
^ R|<local>/it|
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
public get(): R|kotlin/collections/Map<kotlin/String, kotlin/String>| {
|
||||||
|
^ D|/x|.<CS errors: kotlin/getValue>#<R|kotlin/collections/Map<kotlin/String, kotlin/String>|>(Null(null), ::R|/x|)
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
// WITH_STDLIB
|
||||||
|
// ISSUE: KT-54668
|
||||||
|
|
||||||
|
interface A {
|
||||||
|
val list: List<String>
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getA(): A? = null
|
||||||
|
|
||||||
|
val x by <!NEW_INFERENCE_ERROR!>lazy {
|
||||||
|
(getA() ?: error("error")).list.associateBy {
|
||||||
|
it
|
||||||
|
}
|
||||||
|
}<!>
|
||||||
+6
@@ -3467,6 +3467,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest {
|
|||||||
runTest("compiler/fir/analysis-tests/testData/resolve/properties/kotlinOverridesJavaComplex.kt");
|
runTest("compiler/fir/analysis-tests/testData/resolve/properties/kotlinOverridesJavaComplex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("lazyValWithElvisToNothingInside.kt")
|
||||||
|
public void testLazyValWithElvisToNothingInside() throws Exception {
|
||||||
|
runTest("compiler/fir/analysis-tests/testData/resolve/properties/lazyValWithElvisToNothingInside.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("noBackingFieldForExtension.kt")
|
@TestMetadata("noBackingFieldForExtension.kt")
|
||||||
public void testNoBackingFieldForExtension() throws Exception {
|
public void testNoBackingFieldForExtension() throws Exception {
|
||||||
|
|||||||
+6
@@ -3467,6 +3467,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
|||||||
runTest("compiler/fir/analysis-tests/testData/resolve/properties/kotlinOverridesJavaComplex.kt");
|
runTest("compiler/fir/analysis-tests/testData/resolve/properties/kotlinOverridesJavaComplex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("lazyValWithElvisToNothingInside.kt")
|
||||||
|
public void testLazyValWithElvisToNothingInside() throws Exception {
|
||||||
|
runTest("compiler/fir/analysis-tests/testData/resolve/properties/lazyValWithElvisToNothingInside.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("noBackingFieldForExtension.kt")
|
@TestMetadata("noBackingFieldForExtension.kt")
|
||||||
public void testNoBackingFieldForExtension() throws Exception {
|
public void testNoBackingFieldForExtension() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user