[FIR TEST]: add test for KT-35730
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
import Derived.foo
|
||||
|
||||
interface Base {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
object Derived : Base
|
||||
|
||||
fun test() {
|
||||
// See KT-35730
|
||||
foo() // Derived.foo is more correct here
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
FILE: objectOverrideCallViaImport.kt
|
||||
public abstract interface Base : R|kotlin/Any| {
|
||||
public open fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
public final object Derived : R|Base| {
|
||||
private constructor(): R|Derived| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
R|/Base.foo|()
|
||||
}
|
||||
+5
@@ -539,6 +539,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
|
||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/nestedVisibility.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("objectOverrideCallViaImport.kt")
|
||||
public void testObjectOverrideCallViaImport() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/objectOverrideCallViaImport.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("objectVsProperty.kt")
|
||||
public void testObjectVsProperty() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/objectVsProperty.kt");
|
||||
|
||||
Generated
+5
@@ -539,6 +539,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/nestedVisibility.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("objectOverrideCallViaImport.kt")
|
||||
public void testObjectOverrideCallViaImport() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/objectOverrideCallViaImport.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("objectVsProperty.kt")
|
||||
public void testObjectVsProperty() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/objectVsProperty.kt");
|
||||
|
||||
Reference in New Issue
Block a user