Drop enum class object hack
Place valueOf() and values() into the static scope of the corresponding enum class #KT-5580 Fixed #KT-2410 Fixed
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package library
|
||||
|
||||
public enum class EnumClass {
|
||||
ENTRY
|
||||
|
||||
public class object {
|
||||
public fun entry(): EnumClass = ENTRY
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import library.EnumClass
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
if (EnumClass.entry() != EnumClass.ENTRY) throw AssertionError()
|
||||
}
|
||||
Reference in New Issue
Block a user