dmd
dmd copied to clipboard
Bug in template mixin
From https://forum.dlang.org/post/[email protected]:
import std;
mixin template f(int function(int) F){}
mixin template f(void function(int) F){unittest{"void".writeln;}}
//mixin f!((_){}); //FAILS
mixin template g(void function(int) F){unittest{"void".writeln;}}
mixin template g(int function(int) F){}
mixin g!((_){}); //works
Expected behavior: both cases work