Use the getDeclaredField() method instead of objectInstance in ButtonImpl.kt
This commit is contained in:
parent
82de485b17
commit
39c6d8ebb1
|
@ -21,7 +21,7 @@ sealed class ButtonImpl: ColoredElement(0.0, 0.0, 73, 8, opacity = 0.60F) {
|
|||
((try {
|
||||
it.getConstructor().newInstance()
|
||||
} catch (e: NoSuchMethodException) {
|
||||
it.kotlin.objectInstance!!
|
||||
it.getDeclaredField("INSTANCE").get(null)
|
||||
}) as ButtonImpl).let { impl ->
|
||||
with(impl) {
|
||||
if (info.kind == ButtonInfo.Companion.Type.TOGGLE) {
|
||||
|
|
Loading…
Reference in New Issue