diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrElementToJsExpressionTransformer.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrElementToJsExpressionTransformer.kt index e93c55a39e9..e6aab7251fe 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrElementToJsExpressionTransformer.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrElementToJsExpressionTransformer.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -95,6 +95,14 @@ class IrElementToJsExpressionTransformer : BaseIrElementToJsNodeTransformer() +public inline val I.Companion.K: I get() = "K".asDynamic().unsafeCast() + +fun box(): String { + if (I.O != I.O) return "Fail 1" + if (I.O == I.K) return "Fail 2" + return I.O.unsafeCast() + I.K.unsafeCast() +} \ No newline at end of file