JS/RTTI: in expressions like a as T when inferred type for a is S, where S <: T, don't generate type checking
This commit is contained in:
+3
-3
@@ -17,7 +17,7 @@
|
||||
(function (Kotlin) {
|
||||
"use strict";
|
||||
|
||||
Kotlin.CharSequence = Kotlin.createTraitNow(null);
|
||||
var CharSequence = Kotlin.createTraitNow(null);
|
||||
|
||||
// Shims for String
|
||||
if (typeof String.prototype.startsWith === "undefined") {
|
||||
@@ -138,7 +138,7 @@
|
||||
};
|
||||
|
||||
Kotlin.isCharSequence = function (value) {
|
||||
return typeof value === "string" || Kotlin.isType(value, Kotlin.CharSequence);
|
||||
return typeof value === "string" || Kotlin.isType(value, CharSequence);
|
||||
};
|
||||
|
||||
Kotlin.charInc = function (value) {
|
||||
@@ -1146,7 +1146,7 @@
|
||||
};
|
||||
|
||||
|
||||
Kotlin.StringBuilder = Kotlin.createClassNow([Kotlin.CharSequence],
|
||||
Kotlin.StringBuilder = Kotlin.createClassNow([CharSequence],
|
||||
function (content) {
|
||||
this.string = typeof(content) == "string" ? content : "";
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user