Adjust js stdlib to isEmpty transformation

This commit is contained in:
Denis Zharkov
2015-10-09 14:07:41 +03:00
parent 61459961fc
commit 83b680935b
5 changed files with 26 additions and 18 deletions
+5 -3
View File
@@ -398,8 +398,10 @@
}
return true;
},
isEmpty: function () {
return this.size === 0;
isEmpty: {
get: function () {
return this.size === 0;
}
},
iterator: function () {
// TODO: Do not implement mutable iterator() this way, make abstract
@@ -970,7 +972,7 @@
});
Kotlin.collectionsMax = function (c, comp) {
if (c.isEmpty()) {
if (c.isEmpty) {
//TODO: which exception?
throw new Error();
}