Special enum function support; Fix for KT-10569: Cannot iterate over values of an enum class when it is used as a generic parameter

#KT-10569 Fixed
This commit is contained in:
Michael Bogdanov
2016-11-02 12:32:47 +03:00
parent 6a3597fa0f
commit fd6d4c352c
28 changed files with 547 additions and 4 deletions
@@ -0,0 +1,20 @@
// FILE: 1.kt
// WITH_RUNTIME
package test
inline fun myValueOf(): String {
return enumValueOf<Z>("OK").name
}
enum class Z {
OK
}
// FILE: 2.kt
import test.*
fun box(): String {
return myValueOf()
}