K2: reproduce KT-56614
This commit is contained in:
committed by
Space Team
parent
39c38aa588
commit
ce381f335d
+6
@@ -4251,6 +4251,12 @@ public class DiagnosticCompilerTestFirTestdataTestGenerated extends AbstractDiag
|
|||||||
runTest("compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.kt");
|
runTest("compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("samVsLambda.kt")
|
||||||
|
public void testSamVsLambda() throws Exception {
|
||||||
|
runTest("compiler/fir/analysis-tests/testData/resolve/samConversions/samVsLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("samWithEquals.kt")
|
@TestMetadata("samWithEquals.kt")
|
||||||
public void testSamWithEquals() throws Exception {
|
public void testSamWithEquals() throws Exception {
|
||||||
|
|||||||
+6
@@ -4251,6 +4251,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFirTestDataTestGenerated
|
|||||||
runTest("compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.kt");
|
runTest("compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("samVsLambda.kt")
|
||||||
|
public void testSamVsLambda() throws Exception {
|
||||||
|
runTest("compiler/fir/analysis-tests/testData/resolve/samConversions/samVsLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("samWithEquals.kt")
|
@TestMetadata("samWithEquals.kt")
|
||||||
public void testSamWithEquals() throws Exception {
|
public void testSamWithEquals() throws Exception {
|
||||||
|
|||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
FILE: package1.kt
|
||||||
|
package p1
|
||||||
|
|
||||||
|
public abstract fun interface SamUnit : R|kotlin/Any| {
|
||||||
|
public abstract fun foo(): R|kotlin/Unit|
|
||||||
|
|
||||||
|
}
|
||||||
|
public final fun bar(x: R|kotlin/String|, y: R|kotlin/String|, z: R|p1/SamUnit|): R|kotlin/Unit| {
|
||||||
|
}
|
||||||
|
FILE: package2.kt
|
||||||
|
package p2
|
||||||
|
|
||||||
|
public final fun bar(x: R|kotlin/Any|, y: R|kotlin/Any|, z: R|() -> kotlin/Unit|): R|kotlin/Unit| {
|
||||||
|
}
|
||||||
|
FILE: main.kt
|
||||||
|
public final fun main(): R|kotlin/Unit| {
|
||||||
|
R|p2/bar|(String(), String(), <L> = bar@fun <anonymous>(): R|kotlin/Unit| <inline=NoInline> {
|
||||||
|
^@bar Unit
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
// ISSUE: KT-56614
|
||||||
|
|
||||||
|
// FILE: package1.kt
|
||||||
|
|
||||||
|
package p1
|
||||||
|
|
||||||
|
fun interface SamUnit {
|
||||||
|
fun foo()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun bar(x: String, y: String, z: SamUnit) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: package2.kt
|
||||||
|
|
||||||
|
package p2
|
||||||
|
|
||||||
|
fun bar(x: Any, y: Any, z: () -> Unit) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
|
import p1.*
|
||||||
|
import p2.*
|
||||||
|
|
||||||
|
fun main() {
|
||||||
|
bar("", "") {} // Resolves to p1.bar in K1, but to p2.bar in K2
|
||||||
|
}
|
||||||
+6
@@ -4251,6 +4251,12 @@ public class FirLightTreeDiagnosticsTestGenerated extends AbstractFirLightTreeDi
|
|||||||
runTest("compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.kt");
|
runTest("compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("samVsLambda.kt")
|
||||||
|
public void testSamVsLambda() throws Exception {
|
||||||
|
runTest("compiler/fir/analysis-tests/testData/resolve/samConversions/samVsLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("samWithEquals.kt")
|
@TestMetadata("samWithEquals.kt")
|
||||||
public void testSamWithEquals() throws Exception {
|
public void testSamWithEquals() throws Exception {
|
||||||
|
|||||||
+6
@@ -4251,6 +4251,12 @@ public class FirPsiDiagnosticTestGenerated extends AbstractFirPsiDiagnosticTest
|
|||||||
runTest("compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.kt");
|
runTest("compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("samVsLambda.kt")
|
||||||
|
public void testSamVsLambda() throws Exception {
|
||||||
|
runTest("compiler/fir/analysis-tests/testData/resolve/samConversions/samVsLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("samWithEquals.kt")
|
@TestMetadata("samWithEquals.kt")
|
||||||
public void testSamWithEquals() throws Exception {
|
public void testSamWithEquals() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user