Brian G
06/09/2021, 7:50 PMe: java.lang.IllegalStateException: Duplicate live literal key found
.
Is there a way to turn "live literals" off project wide instead of putting @NoLiveLiterals
everwhere?jim
06/09/2021, 7:53 PMBrian G
06/09/2021, 8:03 PM@file:NoLiveLiterals
in the affected files which works around the issue. Let me know if sample code is helpful or this is a known issue.Brian G
06/09/2021, 8:04 PMLeland Richardson [G]
06/09/2021, 8:07 PMcomposeOptions {
useLiveLiterals false
}
Leland Richardson [G]
06/09/2021, 8:08 PMColton Idle
06/09/2021, 8:09 PMBrian G
06/09/2021, 8:29 PMe: java.lang.IllegalStateException: Duplicate live literal key found: String$branch-2$when$fun-setLayoutParams$class-JGOViewImpl
It happens on this line in my method JGOViewImpl.setLayoutParams, where rootNode is an HTMLElement:
rootNode.style.asDynamic().gridColumnStart = "1"
(I'm not surprised the asDynamic() is causing issues. I can easily replace it with setProperty
in this case, which fixes the error)Brian G
06/09/2021, 8:40 PMe: java.lang.IllegalStateException: Duplicate live literal key found: String$arg-0$call-onComplete$fun-$anonymous$$arg-0$call-$set-handler$$fun-$anonymous$$arg-0$call-apply$0$vararg$arg-0$call-arrayOf$arg-0$call-$set-buttons$$fun-showPicker$class-IonicHelper
And is also caused by dynamic
:
var handler: (value: dynamic) -> Unit
...
handler = {
dialog.onComplete(it["column0"]["value"] as Int)
}
Brian G
06/09/2021, 8:43 PMdynamic
, here's the last one: e: java.lang.IllegalStateException: Duplicate live literal key found: String$arg-0$call-onComplete$fun-$anonymous$$arg-0$call-$set-handler$$fun-$anonymous$$arg-0$call-apply$0$vararg$arg-0$call-arrayOf$arg-0$call-$set-buttons$$fun-showPicker$class-IonicHelper
fun NumberFormatOptions(
style: String? = undefined,
currency: String? = undefined
): dynamic {
val o = js("({})")
o["style"] = style // live literal error here
o["currency"] = currency
return o
}
Big Chungus
06/09/2021, 8:57 PMBrian G
06/10/2021, 2:19 PM