Adjust js stdlib to isEmpty transformation
This commit is contained in:
+5
-3
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user