Do not discriminate synthesized candidates.

#KT-9965 Fixed
This commit is contained in:
Stanislav Erokhin
2015-12-18 01:35:43 +03:00
parent 1b6f96ac2b
commit 8b5a194dd6
14 changed files with 166 additions and 17 deletions
@@ -0,0 +1,30 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
// FILE: s/SamConstructor.java
package s;
public class SamConstructor {
public SamConstructor(Runnable r) {
}
public static void foo(Runnable r) {}
}
// FILE: 1.kt
package a
fun SamConstructor(a: () -> Unit) {}
// FILE: 2.kt
package b
import s.SamConstructor
import a.*
fun test() {
val a: s.SamConstructor = SamConstructor { }
val b: s.SamConstructor = SamConstructor(null)
SamConstructor.foo(null)
}