HaxeFoundation / HaxeFoundation/haxe
[js] ObjectMap<String, {}> Cannot create property '__id__'
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
Source code:
```haxe
class Test {
static function main() {
var map = new haxe.ds.ObjectMap();
map.set('abc', {});
trace(map);
}
}
```
Error:
```
Uncaught TypeError: Cannot create property '__id__' on string 'abc',https://try.haxe.org/program/d09d3Dc8/run?r=0.10555269501561204,line:23
```
All Haxe versions
Contributor guide
Research direction
Start by running the provided Test.main reproduction through the linked try.haxe.org example and inspect the generated JavaScript for ObjectMap. Trace why setting the string key attempts to create __id__ on the key, then confirm the corrected behavior by rerunning the example without the TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100