mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 08:31:29 +00:00
Return type must be wrapped if any super-method in the hierarchy, not just the direct super-method, returns a reference type (as opposed to a primitive type) Actually there was a test reflecting this, but it wasn't running because of an unfixed diagnostic error
14 lines
143 B
Kotlin
14 lines
143 B
Kotlin
package test
|
|
|
|
trait A<T> {
|
|
fun foo(): T
|
|
}
|
|
|
|
trait B : A<Int>
|
|
|
|
abstract class C : B
|
|
|
|
open class D : C() {
|
|
override fun foo(): Int = 42
|
|
}
|