package test internal interface A { internal abstract fun foo(): T } internal abstract class B : test.A { public constructor B() internal abstract fun foo(): kotlin.Int } public/*package*/ open class ExtendsB : test.B { public/*package*/ constructor ExtendsB() public open fun foo(): kotlin.Int! public/*package*/ open fun test(): kotlin.Unit }