Using core.reflect to check for unused parameters

user1234 user1234 at 12.de
Fri Sep 3 15:32:59 UTC 2021


On Friday, 3 September 2021 at 14:45:20 UTC, Stefan Koch wrote:
> On Friday, 3 September 2021 at 13:02:37 UTC, user1234 wrote:
>> On Thursday, 2 September 2021 at 21:27:33 UTC, Stefan Koch 
>> wrote:
>>> [...]
>>> now this visitor will reliably detect usage of parameters.
>>
>> BTW, I'm curious to know how this can work. Should not VarExp 
>> (and not VarDecl) be overridden to mark ?
>
> VerExps have a VarDecl member.
> which the transitive visitor looks into for you.
>
> You could look at VarExps but I chose to look into VarDecls 
> instead.

so FuncDeclaration parameters are not visited, that's why that 
works ?
only bodies are visited ?


More information about the Digitalmars-d mailing list