Bad class file with enums


#1

I have an enum:

public enum class DrawableRes(public val ord: Int, public val icon: Boolean) {
  IC_KEY: DrawableRes(100, true)
  IC_BOOK: DrawableRes(101, true)
  …
}

If I use it with my Kotlin code, it works fine, but when I try to use it from java code like this:
DrawableRes.IC_BOOK.getOrd()
I get the following error:
[ERROR] … cannot access …DrawableRes
bad class file: …DrawableRes.class(…:DrawableRes.class)
bad RuntimeInvisibleParameterAnnotations attribute: DrawableRes(int,boolean)

Am I doing something wrong. Is it a bug or should I access the enum differently?

I am using 0.6.350.


#2

It's clearly a bug. Please report to the tracker


#3

Here it is: http://youtrack.jetbrains.com/issue/KT-4050


#4

Fixed.   


#5

Could we get a build with that fix included pushed to maven please? 0.6.786 maybe?


#6

Will be in Central in a few hours