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,20 @@
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
enum class Foo {
FOO;
companion object {
fun valueOf(something: String) = 2
fun values() = 1
}
}
fun test() {
Foo.values() checkType { _<Array<Foo>>() }
Foo.Companion.values() checkType { _<Int>() }
Foo.valueOf("") checkType { _<Foo>() }
Foo.Companion.valueOf("") checkType { _<Int>() }
}