HaxeFoundation / HaxeFoundation/haxe
[js] enum representation: using toString as parameter name overrides the actual value with $estr
Open
bug
platform-javascript
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
```haxe
enum E {
A(toString:Int);
}
```
leads to this JS output:
```js
var E = $hxEnums["E"] = { __ename__:true,__constructs__:null
,A: ($_=function(toString) { return {_hx_index:0,toString:toString,__enum__:"E",toString:$estr}; },$_._hx_name="A",$_.__params__ = ["toString"],$_)
};
```
https://try.haxe.org/#ED26893C
Contributor guide
Assessment
This issue has not been assessed yet.