Re: need this for name of type string

2019-09-10 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 11:20:03 UTC, Ali Çehreli wrote: On 09/10/2019 03:32 AM, Andre Pany wrote: > [...] The UDA syntax allows both types and an objects. method0 uses Foo type and method1 uses a Foo object. So, if your API allows both, your code that deals with UDA must

Re: need this for name of type string

2019-09-10 Thread Ali Çehreli via Digitalmars-d-learn
On 09/10/2019 03:32 AM, Andre Pany wrote: > @Foo void method0(){} > > @Foo("abc") void method1(){} The UDA syntax allows both types and an objects. method0 uses Foo type and method1 uses a Foo object. So, if your API allows both, your code that deals with UDA must account for both.

Re: need this for name of type string

2019-09-10 Thread Alex via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 10:32:29 UTC, Andre Pany wrote: Hi, following coding is throwing compiler error: need this for name of type string The error disappears if I delete method0. My gut feeling is, this is a compiler bug? --- class C { static this() { getT!(typeof

need this for name of type string

2019-09-10 Thread Andre Pany via Digitalmars-d-learn
Hi, following coding is throwing compiler error: need this for name of type string The error disappears if I delete method0. My gut feeling is, this is a compiler bug? --- class C { static this() { getT!(typeof(this))(); } @Foo void method0(){} @Foo("abc&q