[JS IR BE] Fix funny safe call

This commit is contained in:
Svyatoslav Kuzmich
2018-10-19 22:07:20 +03:00
parent 27ff4da94d
commit 47b0f94903
@@ -151,7 +151,9 @@ class EqualityAndComparisonCallsTransformer(context: JsIrBackendContext) : Calls
}
private fun IrFunction.isMethodOfPrimitiveJSType() =
dispatchReceiverParameter?.type?.getPrimitiveType() != PrimitiveType.OTHER
dispatchReceiverParameter?.let {
it.type.getPrimitiveType() != PrimitiveType.OTHER
} ?: false
private fun IrFunction.isMethodOfPotentiallyPrimitiveJSType() =
isMethodOfPrimitiveJSType() || isFakeOverriddenFromAny()