Skip to content

Commit

Permalink
[hl] Fix weird compiler error (#11690)
Browse files Browse the repository at this point in the history
  • Loading branch information
Apprentice-Alchemist authored and kLabz committed Jul 29, 2024
1 parent 710a987 commit 2a082c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/generators/hl2c.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ let make_types_idents htypes =
in
let hashes = Hashtbl.create 0 in
let make_sign d =
let dig = Digest.to_hex (Digest.bytes (Marshal.to_bytes d [Marshal.Compat_32])) in
let dig = Digest.to_hex (Digest.bytes (Marshal.to_bytes d [Marshal.Closures])) in
let h = String.sub dig 0 7 in
let h = if Hashtbl.mem hashes h then dig else h in
Hashtbl.add hashes h ();
Expand Down
2 changes: 2 additions & 0 deletions tests/misc/hl/projects/Issue11689/Main.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
function foo(val:hl.Ref<String>) {}
function main() {}
2 changes: 2 additions & 0 deletions tests/misc/hl/projects/Issue11689/compile.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-m Main
-hl out/main.c

0 comments on commit 2a082c7

Please sign in to comment.