Re: Mixin template parameter overloading bug?

2025-06-15 Thread Manfred Nowak via Digitalmars-d-learn
On Sunday, 15 June 2025 at 10:51:37 UTC, Nick Treleaven wrote: An untyped parameter does make the literal an actual template: ```d pragma(msg, __traits(isTemplate, (x) {})); // true ``` It can be instantiated with a type parameter. Therefore in the case discussed, the code `(_){}' declares a

Re: Mixin template parameter overloading bug?

2025-06-15 Thread Monkyyy via Digitalmars-d-learn
On Sunday, 15 June 2025 at 10:51:37 UTC, Nick Treleaven wrote: So I think there must be another reason why your unary literals work. Given it's specifically void return, and top level and it acts like it matches the first return, I expect that void is incorrectly being considered a invalid

Re: Mixin template parameter overloading bug?

2025-06-15 Thread Nick Treleaven via Digitalmars-d-learn
On Saturday, 14 June 2025 at 23:49:19 UTC, Steven Schveighoffer wrote: A lambda is a shortened syntax for a function literal or delegate literal. HOWEVER, when you do not give the parameters types, the lambda becomes a template! Well, not actually a template, but a quasi-template. An untype