Failing with compilation error when Java library has wrong @KotlinSignatureAnnotation.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
package test;
|
||||
|
||||
val x = ClassWithWrongKotlinSignature.foo()
|
||||
@@ -0,0 +1,4 @@
|
||||
ERROR: The following Java entities have annotations wrong Kotlin signatures:
|
||||
ClassWithWrongKotlinSignature java.lang.String foo(): Function names mismatch, original: foo, alternative: bar
|
||||
|
||||
COMPILATION_ERROR
|
||||
@@ -0,0 +1,8 @@
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class ClassWithWrongKotlinSignature {
|
||||
@KotlinSignature("fun bar() : String")
|
||||
public static String foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user