KT-1141 No check that object in 'object expression' implements all abstract members of supertype

This commit is contained in:
svtk
2012-01-26 15:22:16 +04:00
parent 9b2e4c7d16
commit fc8bc52ea2
5 changed files with 39 additions and 2 deletions
@@ -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
}