Extract function: Do not report conflicts for fake overrides/delegates of the same callable declaration

This commit is contained in:
Alexey Sedunov
2015-02-10 15:15:58 +03:00
parent cef9996ba7
commit 9f3ba50dc5
6 changed files with 68 additions and 2 deletions
@@ -0,0 +1,10 @@
// PARAM_DESCRIPTOR: val t: <no name provided> defined in foo
// PARAM_TYPES: T
trait T {
fun test() {}
}
fun foo() {
val t = object: T {}
<selection>(object: T by t {}).test()</selection>
}
@@ -0,0 +1,14 @@
// PARAM_DESCRIPTOR: val t: <no name provided> defined in foo
// PARAM_TYPES: T
trait T {
fun test() {}
}
fun foo() {
val t = object: T {}
__dummyTestFun__(t)
}
private fun __dummyTestFun__(t: T) {
(object : T by t {}).test()
}
@@ -0,0 +1,7 @@
trait T {
fun test() {}
}
fun foo() {
<selection>(object: T {}).test()</selection>
}
@@ -0,0 +1,11 @@
trait T {
fun test() {}
}
fun foo() {
__dummyTestFun__()
}
private fun __dummyTestFun__() {
(object : T {}).test()
}