KT-6014 Wrong ABSTRACT_MEMBER_NOT_IMPLEMENTED for toString implemented by delegation
Members declared in interface or overriding members declared in super-interfaces can be implemented by delegation even if they override members declared in super-class (NB for interface this can be only 'kotlin.Any').
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
interface IBase {
|
||||
override fun toString(): String
|
||||
}
|
||||
|
||||
interface IDerived : IBase
|
||||
|
||||
object BaseImpl : IBase {
|
||||
override fun toString(): String = "A"
|
||||
}
|
||||
|
||||
object DerivedImpl : IDerived {
|
||||
override fun toString(): String = "A"
|
||||
}
|
||||
|
||||
class Test1 : IBase by BaseImpl
|
||||
|
||||
class Test2 : IDerived by DerivedImpl
|
||||
@@ -0,0 +1,41 @@
|
||||
package
|
||||
|
||||
public object BaseImpl : IBase {
|
||||
private constructor BaseImpl()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public object DerivedImpl : IDerived {
|
||||
private constructor DerivedImpl()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface IBase {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract override /*1*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface IDerived : IBase {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Test1 : IBase {
|
||||
public constructor Test1()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*delegation*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Test2 : IDerived {
|
||||
public constructor Test2()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*delegation*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user