8b5a194dd6
#KT-9965 Fixed
20 lines
423 B
Kotlin
Vendored
20 lines
423 B
Kotlin
Vendored
// !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>() }
|
|
} |