1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

v.gen.js: fix references and add iterator to map (#10938)

This commit is contained in:
playX
2021-07-24 15:35:17 +03:00
committed by GitHub
parent 45a15755b8
commit f51fa7e665
3 changed files with 54 additions and 21 deletions

View File

@ -8,7 +8,9 @@ struct map {
// Removes the mapping of a particular key from the map.
[unsafe]
pub fn (mut m map) delete(key voidptr) {
#m.m.delete(key)
#m.map.delete(key)
}
pub fn (m &map) free() {}
#map.prototype[Symbol.iterator] = function () { return this.map[Symbol.iterator](); }