Files
kotlin-fork/compiler/testData/diagnostics/tests/j+k/annotationsInheritance.kt
T
Denis Zharkov 8ae3dbdcfc Refine ClassDescriptor::isCommonFinalClass definition
Do not treat annotations as final classes as they are not final in Java

 #KT-20776 Fixed
2017-10-16 16:11:35 +03:00

20 lines
291 B
Kotlin
Vendored

// FILE: MyAnnotation.java
public @interface MyAnnotation {
}
// FILE: MyAnnoClass.java
public class MyAnnoClass implements MyAnnotation {
//...
}
// FILE: main.kt
val ann: MyAnnotation = MyAnnoClass()
fun foo(x: MyAnnoClass) {
bar(x)
}
fun bar(y: MyAnnotation) {
y.hashCode()
}