My project uses the signatures of user defined functions to automatically generate arguments for them. It gets passed fn pointers during comptime and generates a type to hold each of the pointers. Currently this causes the compiler to give this error:
src\ecs.zig:195:13: error: TODO (LLVM): implement const of pointer type '[TODO fix internal compiler bug regarding dump]' (value.Value.Tag.function)
pub fn init(alloc: Allocator) !Self {
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Is there any way around this? Currently I have to implement two passes, where I gather the Component types and Fn signatures first and then during runtime get their pointers. This might require the user to repeat themselves which isn't very ideal.
I'm also thinking of trying to finish this TODO myself but I'm not exactly well versed in the compiler internals or LLVM, so that will probably go horribly lol.
Recreating the bug:
cd into the base directory.
run zig build test
Any pull requests or ideas are greatly appreciated:
https://github.com/freakmangd/zentig_ecs