https://issues.dlang.org/show_bug.cgi?id=19640
RazvanN <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from RazvanN <[email protected]> --- There are multiple issues with the code you've written. First of all you cannot have a main function with betterC because dmd creates a d_run_main function which is the entrypoint of d programs. Typically, you just create the object file with betterC and then you link it with some C code. This is a minor aspect, regarding the test code. The main issue with the code is that the delegate (() => i) requires a closure that is allocated with the GC. Since you are compiling with -betterC, the GC is not available. --
