Fix for KT-9711: Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE

#KT-9711 Fixed
This commit is contained in:
Michael Bogdanov
2015-10-23 13:49:07 +03:00
parent 882827bf04
commit b0efcec392
6 changed files with 60 additions and 7 deletions
+13
View File
@@ -0,0 +1,13 @@
enum class X {
B {
val value2 = "OK"
override val value = { value2 }
};
abstract val value: () -> String
}
fun box(): String {
return X.B.value()
}
+18
View File
@@ -0,0 +1,18 @@
enum class IssueState {
FIXED {
override fun ToString() = D().k
fun s() = "OK"
class D {
val k = s()
}
};
open fun ToString() : String = "fail"
}
fun box(): String {
return IssueState.FIXED.ToString()
}