jlleitschuh
07/24/2017, 7:47 PMType 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:
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
.