Mixin template parameter overloading bug?
Andrey Zherikov
andrey.zherikov at gmail.com
Sat Jun 14 11:31:56 UTC 2025
On Saturday, 14 June 2025 at 03:17:09 UTC, monkyyy wrote:
>
>
> ```d
> 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
> ```
> this example makes it purely a compiler bug
>
> I cant escape any useful information(I tried `typeof(return)`),
> seems to be limited to just void return functions
I created https://github.com/dlang/dmd/issues/21447
More information about the Digitalmars-d-learn
mailing list