Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hlc] Weird compiler error #11689

Closed
Apprentice-Alchemist opened this issue Jun 8, 2024 · 0 comments · Fixed by #11690
Closed

[hlc] Weird compiler error #11689

Apprentice-Alchemist opened this issue Jun 8, 2024 · 0 comments · Fixed by #11690

Comments

@Apprentice-Alchemist
Copy link
Contributor

function foo(val:hl.Ref<String>) {}

function main() {}

Compile with haxe -m Main -hl out/main.c.

Error message:

 ERROR  (unknown position)

   | Invalid_argument("output_value: functional value")

Tested with commit c850b65

Stack trace obtained by running with OCAMLRUNPARAM=b

Fatal error: exception Invalid_argument("output_value: functional value")
Raised by primitive operation at Hl2c.make_types_idents.make_sign in file "src/generators/hl2c.ml", line 1172, characters 40-80
Called from Hl2c.make_types_idents.desc_string in file "src/generators/hl2c.ml", line 1187, characters 14-25
Called from PMap.mapi.loop in file "src/pMap.ml", line 150, characters 16-21
Called from PMap.mapi.loop in file "src/pMap.ml", line 149, characters 12-18
Called from PMap.mapi.loop in file "src/pMap.ml", line 149, characters 12-18
Called from PMap.mapi.loop in file "src/pMap.ml", line 149, characters 12-18
Called from PMap.mapi.loop in file "src/pMap.ml", line 149, characters 12-18
Called from PMap.mapi.loop in file "src/pMap.ml", line 148, characters 12-18
Called from PMap.mapi.loop in file "src/pMap.ml", line 149, characters 12-18
Called from PMap.mapi.loop in file "src/pMap.ml", line 149, characters 12-18
Called from PMap.mapi in file "src/pMap.ml", line 151, characters 21-29
Called from Hl2c.write_c in file "src/generators/hl2c.ml", line 1457, characters 17-41
Called from Genhl.generate in file "src/generators/genhl.ml", line 4291, characters 2-39
Called from Generate.generate in file "src/compiler/generate.ml", line 204, characters 3-15
Called from Compiler.compile in file "src/compiler/compiler.ml", line 403, characters 29-64
Called from Compiler.compile_safe in file "src/compiler/compiler.ml", line 419, characters 1-5
Called from Compiler.compile_safe in file "src/compiler/compiler.ml", line 457, characters 5-23
Called from Compiler.compile_ctx.run in file "src/compiler/compiler.ml", line 497, characters 2-131
Called from Compiler.catch_completion_and_exit in file "src/compiler/compiler.ml", line 471, characters 2-9
Called from Compiler.HighLevel.entry.loop in file "src/compiler/compiler.ml", line 694, characters 5-43
Called from Compiler.HighLevel.entry in file "src/compiler/compiler.ml", line 706, characters 13-22
Called from Server.process in file "src/compiler/server.ml", line 803, characters 1-39
Called from Dune__exe__Haxe in file "src/compiler/haxe.ml", line 53, characters 0-56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant