JS/RTTI. Fix run-time type checking against Comparable
This commit is contained in:
committed by
Alexey Andreev
parent
390d71ac8d
commit
9bb60b48b2
+9
@@ -126,6 +126,15 @@
|
||||
return (typeof value) == "string" && value.length == 1;
|
||||
};
|
||||
|
||||
Kotlin.isComparable = function (value) {
|
||||
var type = typeof value;
|
||||
|
||||
return type === "string" ||
|
||||
type === "boolean" ||
|
||||
Kotlin.isNumber(value) ||
|
||||
Kotlin.isType(value, Kotlin.Comparable);
|
||||
};
|
||||
|
||||
Kotlin.charInc = function (value) {
|
||||
return String.fromCharCode(value.charCodeAt(0)+1);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user