1

I'm trying to use a Java library in my Kotlin project.

Creating variables in my project of types defined in the library works fine, e.g. val foo: Foo = fooProvider.get(), but introducing code that actually uses these types, e.g. foo.toString(), causes a compilation error:

Error:Kotlin: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
    class com.example.Foo, unresolved supertypes: ajcMightHaveAspect

From what I have found so far my example Foo type implements ajcMightHaveAspect which is some type of AspectJ interface.

aspectjrt is on my classpath but I cannot find ajcMightHaveAspect defined anywhere.

Is this a Kotlin compiler bug? Am I doing something wrong?

mfulton26
  • 29,956
  • 6
  • 64
  • 88
  • I've created https://youtrack.jetbrains.com/issue/KT-12179 with a demo project attached which reproduces the compilation error. – mfulton26 May 02 '16 at 14:52

1 Answers1

0

Problem was fixed in AspectJ.

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=493554 for more details .

Hope it will help.

piotrek1543
  • 19,130
  • 7
  • 81
  • 94