https://issues.dlang.org/show_bug.cgi?id=22367

--- Comment #12 from Richard Cattermole <alphaglosi...@gmail.com> ---
D module constructors of course shouldn't work in -betterC code. They can throw
a warning as dead code and hence don't require ModuleInfo to be generated (this
should be easy to resolve). That'll prevent surprises in the future.

However, the fundamental problem here is with pay-as-you-go runtime. You can't
turn on ModuleInfo when you need it in -betterC to move you into pay-as-you-go
area of the scale.

We can't turn on ModuleInfo generation right now, because DllImport is
incomplete (a good bit harder to implement). If we did turn it on right now, it
would result in segfaults if you have D DLL's with D with the runtime
executable.

I am arguing that instead of fixing this bug, we solve the DllImport issues
first and use code like this as test cases to verify that it is indeed fixed.

--

Reply via email to