HaxeFoundation / HaxeFoundation/haxe

[hl] Possible t$fun_ naming clashes in HL/C

Open
#9,022 3 comments 0 reactions 0 assignees View on GitHub
bug platform-hl
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

```
$ gcc -O3 -o main_heaps -std=c11 -I . main_heaps.c -lhl
In file included from main_heaps.c:786:
./hl/types.c:6763:9: error: redefinition of 't$fun_844d5e9'
hl_type t$fun_844d5e9 = { HFUN } /* (arpx.texture.Texture,virtual(toString:method:():String,keys:method:():virtual(hasNext:method:():bool,next:method:()...
^
./hl/types.c:6542:9: note: previous definition is here
hl_type t$fun_844d5e9 = { HFUN } /* (arpx.screen.Screen,virtual(readUtf:method:(String):String,readUInt32:method:(String):i32,readScope:method:(String,(...
^
./hl/types.c:21372:17: error: redefinition of 'fargst$fun_844d5e9'
static hl_type *fargst$fun_844d5e9[] = {&t$arpx_texture_Texture,&t$vrt_a254827,&t$arpx_impl_heaps_geom_RectImpl};
^
./hl/types.c:20928:17: note: previous definition is here
static hl_type *fargst$fun_844d5e9[] = {&t$arpx_screen_Screen,&t$vrt_4567b5e};
^
2 errors generated.
$
```

I've tried to port my existing Heaps project to HL/C, but was unlucky enough to have naming clash in output C source code.

I have 6881 occurences of `hl_type t$fun_` in my 7.2MB `hl/types.c`.

The project can be normally built and run with HL/JIT (or JS and Flash).

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.