I'm having a lot of problems with aspectj linking ...
# announcements
j
I'm having a lot of problems with aspectj linking against code that uses kotlin classes from another project. In particular, I keep seeing this:
Copy code
Type mismatch: cannot convert from element type ExtendedSimpleLink to SimpleLink
I have a type hierarchy where
ExtendedSimpleLink extends LinkDecorator
where
ExtendedSimpleLink
is java compiled with aspectj and
LinkDecorator
is written in kotlin and compiled in another project.
LinkDecorator
looks like this:
Copy code
abstract class LinkDecorator(
    private val decorated : SimpleLink
) : SimpleLink by decorated {
    override fun hashCode(): Int = decorated.hashCode()

    override fun equals(other: Any?): Boolean = decorated == other
}
I have no idea why the aspectj compiler can't figure out the type hierarchy. It should be looking at the bytecode for
LinkDecorator
and saying that obviously
ExtendedSimpleLink
is an instance of a
SimpleLink
.