Files
kotlin-fork/compiler/testData/diagnostics/tests/override/FakeOverrideAbstractAndNonAbstractFun.jet
T
Stepan Koltsov e3fdc5d595 fix a case of fake override of abstract and non-abstract function
===
open class Ccc() {
    fun foo() = 1
}

trait Ttt {
    fun foo(): Int
}

class Zzz() : Ccc(), Ttt // there must not be an error here
===

Reported by Andrey Breslav as a bug of Comparator implementation:

===
fun comparator<T>(f: (T, T) -> Int): Comparator<T> = object : Comparator<T>, Object() {
    override fun compare(o1: T, o2: T): Int = f(o1, o2)
}
===
2012-02-13 23:34:01 +04:00

10 lines
99 B
Plaintext

open class Ccc() {
fun foo() = 1
}
trait Ttt {
fun foo(): Int
}
class Zzz() : Ccc(), Ttt