HaxeFoundation / HaxeFoundation/hxcpp
in typedefs anonymous sublocals should never hold the name of their holding local.
- Dominant language
- C++
- Stars
- 330
- Forks
- 227
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 18
Description
Hello chief!
I hope you are well <3
I found out something that could use a fix...
on the haxe side i wrote
```
var fstat : Dynamic = {
gid : 0,
uid : 0,
atime : Date.fromTime(0),
mtime : Date.fromTime(0),
ctime : Date.fromTime(0),
size : 0,
dev : 0,
ino : 0,
nlink : 0,
rdev : 0,
mode : 0,
};
```
and it generates :
```
HX_STACKFRAME(&_hx_pos_bda8f22250d3264b_89_stat)
HXLINE( 93) ::Date fstat = ::Date_obj::fromTime((int)0);
HXLINE( 94) ::Date fstat1 = ::Date_obj::fromTime((int)0);
HXLINE( 90) ::Dynamic fstat2 = ::Dynamic(hx::Anon_obj::Create(11)
```
Problem is when i do :
```
untyped __cpp__('
struct stat st;
int result = ::stat(path.__s,&st);
fstat.size = st.st_size;
');
```
The fstat struct is not the good one, so we should unroll sublocal names with a suffix or something.
The fix on my side is quite easy but fixing on hxcpp side would be just plain awesome.
Thanks a lot :)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.