Kotlin Annotation - Kotlin: Type mismatch: inferred type is java.lang.Class<foo> but java.lang.Class<out jet.Annotation> was expected

hi,

given follwing kotlin Annotation:

public Retention(RetentionPolicy.RUNTIME) annotation class foo(val text : String)

and following code to check if a class is annotated by above annotation:

``

  if (javaClass<Bar>().isAnnotationPresent(javaClass<foo>())) {
           // do something here.
  }

if the annotation class (foo) and the code which is using it were located in the same module (maven artifact), the code can compile and run without any issue,

but if I separate them into different modules (maven artifact), then following compile error happens:

Kotlin: Type mismatch: inferred type is java.lang.Class<foo> but java.lang.Class<out jet.Annotation> was expected

Any Idea what could be the issue ?

I've had issues with using annotations across modules before:

http://youtrack.jetbrains.com/issue/KT-3197

I’m guessing this is related. I would file another bug report.

It's a bug, please report it to our issue tracker.

http://youtrack.jetbrains.com/issue/KT-3534