[FIR TEST] Stabilize top-level extension vs outer member behavior
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
fun Outer.Inner.foo() = 42
|
||||
|
||||
class Outer {
|
||||
|
||||
fun foo() = ""
|
||||
|
||||
inner class Inner {
|
||||
val x = foo() // Should be Int
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
FILE: topExtensionVsOuterMember.kt
|
||||
public final fun R|Outer.Inner|.foo(): R|kotlin/Int| {
|
||||
^foo Int(42)
|
||||
}
|
||||
public final class Outer : R|kotlin/Any| {
|
||||
public constructor(): R|Outer| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/String| {
|
||||
^foo String()
|
||||
}
|
||||
|
||||
public final inner class Inner : R|kotlin/Any| {
|
||||
public constructor(): R|Outer.Inner| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val x: R|kotlin/Int| = this@R|/Outer.Inner|.R|/foo|()
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+5
@@ -684,6 +684,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
|
||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/this.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topExtensionVsOuterMember.kt")
|
||||
public void testTopExtensionVsOuterMember() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/topExtensionVsOuterMember.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeAliasConstructor.kt")
|
||||
public void testTypeAliasConstructor() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/typeAliasConstructor.kt");
|
||||
|
||||
Generated
+5
@@ -684,6 +684,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/this.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topExtensionVsOuterMember.kt")
|
||||
public void testTopExtensionVsOuterMember() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/topExtensionVsOuterMember.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeAliasConstructor.kt")
|
||||
public void testTypeAliasConstructor() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/typeAliasConstructor.kt");
|
||||
|
||||
Reference in New Issue
Block a user