spir: > I guess this does the job?
It's not minimal and it's not complete, it misses a main and the imports :-) But it's OK. A reduced test case shows that DMD has holes here, this compiles with no errors. I think this DMD bug is already in Bugzilla: void foo(ref int x) {} void bar1(void function(int) f) {} void bar2(void function(string) f) {} void main() { bar1(&foo); bar2(&foo); } Bye, bearophile