Explicit this for methods

vit vit at vit.vit
Tue Jul 23 14:13:39 UTC 2024


On Tuesday, 23 July 2024 at 14:00:30 UTC, vit wrote:
> On Tuesday, 23 July 2024 at 11:42:03 UTC, Quirin Schroll wrote:
>> ...
>>>
>>> ```d
>>> class C{
>>> […]
>>> 	abstract void test2(const C this)pure;	//method with 
>>> explicit this with type (is(Unqual!T == C))
>>> ```
>> What is `T`? Did you intend `Unqual!(typeof(this))`?
>
> Yes but `typeof(this)` in this context in unclear too. :) (it 
> is type of aggregate type in witch is method, not type of 
> `this` parameter)

I was wrong, this:

```d
is(Unqual!(typeof(this)) == typeof(aggregate type in which is 
method located))
```


More information about the dip.ideas mailing list