Check no exception when static import in java is used and there's cyclic dependency between kotlin and java (KT-5848)
#KT-5848 Fixed
This commit is contained in:
@@ -0,0 +1,36 @@
|
|||||||
|
// FILE: backend/asmutil/AsmUtil.java
|
||||||
|
package backend.asmutil;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import static frontend.JvmDeclarationOrigin.NO_ORIGIN;
|
||||||
|
|
||||||
|
public class AsmUtil {
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public static String doSmth(String s) {
|
||||||
|
Object or = NO_ORIGIN;
|
||||||
|
return "OK";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: First.kt
|
||||||
|
package frontend
|
||||||
|
public class JvmDeclarationOrigin {
|
||||||
|
class object {
|
||||||
|
public val NO_ORIGIN: JvmDeclarationOrigin = JvmDeclarationOrigin()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: Second.kt
|
||||||
|
package backend
|
||||||
|
|
||||||
|
import backend.asmutil.AsmUtil.doSmth
|
||||||
|
|
||||||
|
open public class ECallable {
|
||||||
|
fun test() {
|
||||||
|
doSmth("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* KT-5848 */
|
||||||
|
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
package backend {
|
||||||
|
|
||||||
|
public open class ECallable {
|
||||||
|
public constructor ECallable()
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
internal final fun test(): kotlin.Unit
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
package backend.asmutil {
|
||||||
|
|
||||||
|
public open class AsmUtil {
|
||||||
|
public constructor AsmUtil()
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
// Static members
|
||||||
|
org.jetbrains.annotations.NotNull() public open fun doSmth(/*0*/ s: kotlin.String!): kotlin.String!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
package frontend {
|
||||||
|
|
||||||
|
public final class JvmDeclarationOrigin {
|
||||||
|
public constructor JvmDeclarationOrigin()
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
public class object <class-object-for-JvmDeclarationOrigin> {
|
||||||
|
private constructor <class-object-for-JvmDeclarationOrigin>()
|
||||||
|
public final val NO_ORIGIN: frontend.JvmDeclarationOrigin
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6269,7 +6269,13 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
|||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/invisiblePackagePrivateInheritedMember.kt");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/invisiblePackagePrivateInheritedMember.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("javaStaticImport.kt")
|
||||||
|
public void testJavaStaticImport() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/javaStaticImport.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("KJKInheritance.kt")
|
@TestMetadata("KJKInheritance.kt")
|
||||||
public void testKJKInheritance() throws Exception {
|
public void testKJKInheritance() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/KJKInheritance.kt");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/KJKInheritance.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user