Egor
09/10/2020, 8:44 AMval someValue = m.getValue("someKey").toString()
...
where m: Map<String,Any>
and someValue in in type map is of type String
it throws Cast exception:
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
It started to happen after upgrade of kotlin-scripting-jvm-host to 1.4.0 (kotlin-scripting-jvm-host-embeddable: 1.3.72 was used before).
It does not throw though when code refactored in this way
val someValue = m.getValue("someKey")
val someValueASString = someValue.toString()