Minor in JS lib: avoid to use undefined literal which may be over overlapped.
This commit is contained in:
@@ -41,7 +41,7 @@
|
|||||||
return Kotlin.arrayEquals(obj1, obj2);
|
return Kotlin.arrayEquals(obj1, obj2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof obj1 == "object" && obj1.equals_za3rmp$ !== undefined) {
|
if (typeof obj1 == "object" && typeof obj1.equals_za3rmp$ === "function") {
|
||||||
return obj1.equals_za3rmp$(obj2);
|
return obj1.equals_za3rmp$(obj2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
return Kotlin.createClassNow(base,
|
return Kotlin.createClassNow(base,
|
||||||
/** @constructs */
|
/** @constructs */
|
||||||
function (message) {
|
function (message) {
|
||||||
this.message = (message !== undefined) ? message : null;
|
this.message = (message !== void 0) ? message : null;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -191,7 +191,7 @@
|
|||||||
function throwAbstractFunctionInvocationError(funName) {
|
function throwAbstractFunctionInvocationError(funName) {
|
||||||
return function () {
|
return function () {
|
||||||
var message;
|
var message;
|
||||||
if (funName !== undefined) {
|
if (funName !== void 0) {
|
||||||
message = "Function " + funName + " is abstract";
|
message = "Function " + funName + " is abstract";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -283,8 +283,8 @@
|
|||||||
|
|
||||||
Kotlin.Enum = Kotlin.createClassNow(null,
|
Kotlin.Enum = Kotlin.createClassNow(null,
|
||||||
function () {
|
function () {
|
||||||
this.name$ = undefined;
|
this.name$ = void 0;
|
||||||
this.ordinal$ = undefined;
|
this.ordinal$ = void 0;
|
||||||
}, {
|
}, {
|
||||||
name: function () {
|
name: function () {
|
||||||
return this.name$;
|
return this.name$;
|
||||||
@@ -848,8 +848,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
Kotlin.collectionsSort = function (mutableList, comparator) {
|
Kotlin.collectionsSort = function (mutableList, comparator) {
|
||||||
var boundComparator = undefined;
|
var boundComparator = void 0;
|
||||||
if (comparator !== undefined) {
|
if (comparator !== void 0) {
|
||||||
boundComparator = comparator.compare.bind(comparator);
|
boundComparator = comparator.compare.bind(comparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -887,9 +887,9 @@
|
|||||||
this.string = "";
|
this.string = "";
|
||||||
}, {
|
}, {
|
||||||
append: function (obj, from, to) {
|
append: function (obj, from, to) {
|
||||||
if (from == undefined && to == undefined) {
|
if (from == void 0 && to == void 0) {
|
||||||
this.string = this.string + obj.toString();
|
this.string = this.string + obj.toString();
|
||||||
} else if (to == undefined) {
|
} else if (to == void 0) {
|
||||||
this.string = this.string + obj.toString().substring(from);
|
this.string = this.string + obj.toString().substring(from);
|
||||||
} else {
|
} else {
|
||||||
this.string = this.string + obj.toString().substring(from, to);
|
this.string = this.string + obj.toString().substring(from, to);
|
||||||
|
|||||||
@@ -383,7 +383,7 @@ var Kotlin = {};
|
|||||||
var obj = {};
|
var obj = {};
|
||||||
obj.name = name;
|
obj.name = name;
|
||||||
obj.get_za3rmp$ = getFun;
|
obj.get_za3rmp$ = getFun;
|
||||||
if (setFun !== undefined) {
|
if (typeof setFun === "function") {
|
||||||
obj.set_wn2jw4$ = setFun;
|
obj.set_wn2jw4$ = setFun;
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function hashSetEquals(o) {
|
function hashSetEquals(o) {
|
||||||
if (o === null || o === undefined || this.size() !== o.size()) return false;
|
if (o == null || this.size() !== o.size()) return false;
|
||||||
|
|
||||||
return this.containsAll_4fm7v2$(o);
|
return this.containsAll_4fm7v2$(o);
|
||||||
}
|
}
|
||||||
@@ -511,7 +511,7 @@
|
|||||||
},
|
},
|
||||||
containsKey_za3rmp$: function (key) {
|
containsKey_za3rmp$: function (key) {
|
||||||
// TODO: should process "__proto__" separately?
|
// TODO: should process "__proto__" separately?
|
||||||
return this.map[key] !== undefined;
|
return this.map[key] !== void 0;
|
||||||
},
|
},
|
||||||
containsValue_za3rmp$: function (value) {
|
containsValue_za3rmp$: function (value) {
|
||||||
var map = this.map;
|
var map = this.map;
|
||||||
@@ -529,15 +529,15 @@
|
|||||||
},
|
},
|
||||||
put_wn2jw4$: function (key, value) {
|
put_wn2jw4$: function (key, value) {
|
||||||
var prevValue = this.map[key];
|
var prevValue = this.map[key];
|
||||||
this.map[key] = value === undefined ? null : value;
|
this.map[key] = value === void 0 ? null : value;
|
||||||
if (prevValue === undefined) {
|
if (prevValue === void 0) {
|
||||||
this.$size++;
|
this.$size++;
|
||||||
}
|
}
|
||||||
return prevValue;
|
return prevValue;
|
||||||
},
|
},
|
||||||
remove_za3rmp$: function (key) {
|
remove_za3rmp$: function (key) {
|
||||||
var prevValue = this.map[key];
|
var prevValue = this.map[key];
|
||||||
if (prevValue !== undefined) {
|
if (prevValue !== void 0) {
|
||||||
delete this.map[key];
|
delete this.map[key];
|
||||||
this.$size--;
|
this.$size--;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user