Files
kotlin-fork/compiler/testData/diagnostics/tests/declarationChecks/kt1141.kt
T
Andrey Breslav 3d8d92c7d3 JetDiagnosticsTest migrated to TestGenerator
- test data files renamed from *.jet to *.kt
2012-07-10 14:48:11 +04:00

22 lines
507 B
Kotlin

//KT-1141 No check that object in 'object expression' implements all abstract members of supertype
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
}