Lazy parameters in fact implemented using delegates and affect @nogc possibility. I propose additions to documentation:
https://dlang.org/spec/function.html#parameters section
It needs to write that the delegate is used, and explicitly document what exactly happens in the case of several occurrences of the used parameter - whether the delegate is called each time, or only the first, and then the returned value is used (affects non-pure lazy parameters).
https://dlang.org/spec/garbage.html#op_involving_gc
It will be useful to mention lazy parameters in this list too.
Comment #1 by robert.schadek — 2024-12-15T15:24:27Z