Files
kotlin/compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ManyClassesHierarchy.kt
Alexander Udalov 2b5bc6b63d Fix logic of forcing method return type to be wrapped
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
2014-05-29 21:24:02 +04:00

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
}