Files
kotlin-fork/compiler/testData/codegen/regressions/kt297.kt
T
2013-01-24 21:12:27 +04:00

4 lines
206 B
Kotlin

// KT-297 Overload resolution ambiguity with required in trait
trait ALE<T> : java.util.ArrayList<T> {
fun getOrValue(index: Int, value : T) : T = if(index >= 0 && index < size()) get(index) else value
}