Kotlin generates redundant CHECKCAST test/AbtractTest
instruction before passing Test
instance to setTest
.
That CHECKCAST
fails with IllegalAccessError
if its type argument is inaccessible in that package.
This problem is tracked in the issue https://youtrack.jetbrains.com/issue/KT-15315