Files
kotlin-fork/compiler/testData/ir/irText/js/dynamic/dynamicInDataClass.kt
T
Brian Norman ed4a778aa7 [FIR2IR] Convert data class properties of type dynamic for hashCode
Properties of type dynamic within a data class cause compilation to fail
when converting FIR to IR. This is because dynamic types do not have a
proper backing class for symbol lookup. However, dynamic types can just
be considered of type Any for hashCode calculations.

^KT-63094 Fixed
2023-11-14 17:45:04 +00:00

9 lines
163 B
Kotlin
Vendored

// TARGET_BACKEND: JS_IR
data class Some(val a: String, val b: dynamic)
fun box(): String {
val event = Some("O", "K")
event.hashCode()
return "OK"
}