JS: throw error from coroutine marker functions
This commit is contained in:
@@ -67,17 +67,28 @@ Kotlin.suspendCall = function(value) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Kotlin.coroutineResult = function(qualifier) {
|
Kotlin.coroutineResult = function(qualifier) {
|
||||||
|
throwMarkerError();
|
||||||
};
|
};
|
||||||
|
|
||||||
Kotlin.coroutineController = function(qualifier) {
|
Kotlin.coroutineController = function(qualifier) {
|
||||||
|
throwMarkerError();
|
||||||
};
|
};
|
||||||
|
|
||||||
Kotlin.coroutineReceiver = function(qualifier) {
|
Kotlin.coroutineReceiver = function(qualifier) {
|
||||||
|
throwMarkerError();
|
||||||
};
|
};
|
||||||
|
|
||||||
Kotlin.setCoroutineResult = function(value, qualifier) {
|
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) {
|
Kotlin.getFunctionById = function(id, defaultValue) {
|
||||||
return function() {
|
return function() {
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user