diff --git a/js/js.libraries/src/js/markerFunctions.js b/js/js.libraries/src/js/markerFunctions.js index 15c2fc30754..ff2bb808a73 100644 --- a/js/js.libraries/src/js/markerFunctions.js +++ b/js/js.libraries/src/js/markerFunctions.js @@ -67,17 +67,28 @@ Kotlin.suspendCall = function(value) { }; Kotlin.coroutineResult = function(qualifier) { + throwMarkerError(); }; Kotlin.coroutineController = function(qualifier) { + throwMarkerError(); }; Kotlin.coroutineReceiver = function(qualifier) { + throwMarkerError(); }; Kotlin.setCoroutineResult = function(value, qualifier) { + throwMarkerError(); }; +function throwMarkerError() { + throw new Error( + "This marker function should never been called. " + + "Looks like compiler did not eliminate it properly. " + + "Please, report an issue if you caught this exception."); +} + Kotlin.getFunctionById = function(id, defaultValue) { return function() { return defaultValue;