FIR: approximate intersections in public position properly
#KT-48166 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
7b0e5927cb
commit
19ab0ab2f8
+6
@@ -0,0 +1,6 @@
|
||||
FILE: ParentOfType.kt
|
||||
public final fun <T : R|kotlin/Number|> R|kotlin/Any|.parentOfTypes(vararg classes: R|kotlin/Array<out kotlin/reflect/KClass<out T>>|): R|T?| {
|
||||
throw R|java/lang/IllegalStateException.IllegalStateException|()
|
||||
}
|
||||
public final val some: R|kotlin/Number?| = String(123).R|/parentOfTypes|<R|it(kotlin/Number & kotlin/Comparable<*>)|>(vararg(<getClass>(Q|kotlin/Int|), <getClass>(Q|kotlin/Double|)))
|
||||
public get(): R|kotlin/Number?|
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
fun <T : Number> Any.parentOfTypes(vararg classes: KClass<out T>): T? {
|
||||
throw IllegalStateException()
|
||||
}
|
||||
|
||||
val some = "123".parentOfTypes(Int::class, Double::class)
|
||||
+6
@@ -5051,6 +5051,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/intellij/IntersectionWithJavaString.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("ParentOfType.kt")
|
||||
public void testParentOfType() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/intellij/ParentOfType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("PersistentStateComponent.kt")
|
||||
public void testPersistentStateComponent() throws Exception {
|
||||
|
||||
+6
@@ -5051,6 +5051,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
||||
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/intellij/IntersectionWithJavaString.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("ParentOfType.kt")
|
||||
public void testParentOfType() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/intellij/ParentOfType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("PersistentStateComponent.kt")
|
||||
public void testPersistentStateComponent() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user