Files
kotlin-fork/idea/testData/unifier/equivalence/declarations/localCallables/localFunctions.kt
T
Dmitry Petrov edf6a2142b Check local function declarations for overload conflicts.
In PSI unifier tests, disable errors for tests on local functions (as irrelevant).
2016-02-12 09:54:21 +03:00

32 lines
639 B
Kotlin
Vendored

// DISABLE-ERRORS
class A(val n: Int)
fun test() {
<selection>fun <T: A> foo(t: T): Int {
fun a(p: Int): Int = p + 1
fun b(q: Int): Int = q - 1
return t.n + a(1) - b(2)
}</selection>
fun <U: A> foo(u: U): Int {
fun x(a: Int): Int = a + 1
fun y(a: Int): Int = a - 1
return u.n + x(1) - y(2)
}
fun <V: A> foo(v: V): Int {
fun a(p: Int): Int = p + 1
fun b(p: Int): Int = p + 1
return v.n + a(1) - b(2)
}
fun a(p: Int): Int = p + 1
fun b(q: Int): Int = q - 1
fun <W: A> foo(w: W): Int {
return w.n + a(1) - b(2)
}
}