KT-1141 No check that object in 'object expression' implements all abstract members of supertype
This commit is contained in:
@@ -8,6 +8,8 @@ fun box() : String {
|
||||
val l2 = o2?.length ?: 0
|
||||
return l1 - l2
|
||||
}
|
||||
|
||||
override fun equals(obj: Any?): Boolean = obj === this
|
||||
}
|
||||
|
||||
w.compare("aaa", "bbb")
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
//KT-1141 No check that object in 'object expression' implements all abstract members of supertype
|
||||
//+JDK
|
||||
|
||||
package kt1141
|
||||
|
||||
public trait SomeTrait {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
val x = <!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>object<!> : SomeTrait {
|
||||
}
|
||||
x.foo()
|
||||
}
|
||||
|
||||
object <!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>Rr<!> : SomeTrait {}
|
||||
|
||||
class <!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>C<!> : SomeTrait {}
|
||||
|
||||
fun foo2() {
|
||||
val <!UNUSED_VARIABLE!>r<!> = <!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>object<!> : Runnable {} //no error
|
||||
}
|
||||
Reference in New Issue
Block a user