// dimodule.di
void fn()() { return; }
// main.d
import dimodule;
void main() { fn(); }
this works with "dmd main.d", but "dmd -i main.d" gives an undefined symbol error for the template function
tested with versions: dmd v2.098.1 and current git master (commit cbd0b47e0fa264b1310d302447e2dabb64e4e7ee)
the importC builtin functions in __builtins.di can't be used with dmd -i because of this:
// main.c
// undefined symbol error with "dmd -i main.c" but works with "dmd main.c"
int main() { double x = __builtin_inf(); }
Comment #1 by robert.schadek — 2024-12-13T19:20:52Z