Not loading SAM adapters from compiled Kotlin classes.
This commit is contained in:
+3
-1
@@ -280,7 +280,9 @@ public final class JavaFunctionResolver {
|
|||||||
if (function != null) {
|
if (function != null) {
|
||||||
functionsFromCurrent.add(function);
|
functionsFromCurrent.add(function);
|
||||||
|
|
||||||
ContainerUtil.addIfNotNull(functionsFromCurrent, resolveSamAdapter(function));
|
if (!DescriptorResolverUtils.isKotlinClass(psiClass)) {
|
||||||
|
ContainerUtil.addIfNotNull(functionsFromCurrent, resolveSamAdapter(function));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
internal fun foo(/*0*/ r: java.lang.Runnable): jet.Unit
|
||||||
|
|
||||||
|
public trait TaskObject {
|
||||||
|
internal abstract fun foo(/*0*/ r: java.lang.Runnable): jet.Unit
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
public trait Runnable {
|
||||||
|
internal abstract fun run(): jet.Unit
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
public trait TaskObject {
|
||||||
|
fun foo(r: Runnable)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo(r: Runnable) {
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
public trait Runnable {
|
||||||
|
fun run()
|
||||||
|
}
|
||||||
@@ -414,6 +414,16 @@ public class LoadCompiledKotlinTestGenerated extends AbstractLoadCompiledKotlinT
|
|||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadKotlin/fun"), Pattern.compile("^(.+)\\.kt$"), true);
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadKotlin/fun"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("NoSamAdapter.kt")
|
||||||
|
public void testNoSamAdapter() throws Exception {
|
||||||
|
doTestWithAccessors("compiler/testData/loadKotlin/fun/NoSamAdapter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("NoSamConstructor.kt")
|
||||||
|
public void testNoSamConstructor() throws Exception {
|
||||||
|
doTestWithAccessors("compiler/testData/loadKotlin/fun/NoSamConstructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("PropagateDeepSubclass.kt")
|
@TestMetadata("PropagateDeepSubclass.kt")
|
||||||
public void testPropagateDeepSubclass() throws Exception {
|
public void testPropagateDeepSubclass() throws Exception {
|
||||||
doTestWithAccessors("compiler/testData/loadKotlin/fun/PropagateDeepSubclass.kt");
|
doTestWithAccessors("compiler/testData/loadKotlin/fun/PropagateDeepSubclass.kt");
|
||||||
|
|||||||
+10
@@ -416,6 +416,16 @@ public class LazyResolveNamespaceComparingTestGenerated extends AbstractLazyReso
|
|||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadKotlin/fun"), Pattern.compile("^(.+)\\.kt$"), true);
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadKotlin/fun"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("NoSamAdapter.kt")
|
||||||
|
public void testNoSamAdapter() throws Exception {
|
||||||
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadKotlin/fun/NoSamAdapter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("NoSamConstructor.kt")
|
||||||
|
public void testNoSamConstructor() throws Exception {
|
||||||
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadKotlin/fun/NoSamConstructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("PropagateDeepSubclass.kt")
|
@TestMetadata("PropagateDeepSubclass.kt")
|
||||||
public void testPropagateDeepSubclass() throws Exception {
|
public void testPropagateDeepSubclass() throws Exception {
|
||||||
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadKotlin/fun/PropagateDeepSubclass.kt");
|
doTestCheckingPrimaryConstructorsAndAccessors("compiler/testData/loadKotlin/fun/PropagateDeepSubclass.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user