Files
kotlin-fork/compiler/testData/diagnostics/tests/objects/kt2240.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

13 lines
234 B
Kotlin

package a
//KT-2240 Wrong overload resolution ambiguity when object literal is involved
class A {}
fun A.foo<T>(<!UNUSED_PARAMETER!>f<!> : T) {}
val o = object {
fun foo<T>(f: T) {
A().foo(f) // Ambiguity here!
}
}