HaxeFoundation / HaxeFoundation/haxe

[js] Using a StringMap in __init__

Open
#5,707 10 comments 0 reactions 0 assignees View on GitHub
platform-javascript
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

The `__init__` static of a StringMap is called after an `__init__` which uses a StringMap. Resulting in `__map_reserved` being undefined:

```
Cannot read property 'key' of undefined
```

Example (see compiled js): http://try.haxe.org/#241E8

``` haxe
class Test {
static function __init__() {
var a = new Map();
a.set('key', 'value');
trace(a.get('key'));
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.