Puzzled by this behavior

Paul Backus snarwin at gmail.com
Tue May 31 17:53:07 UTC 2022


On Tuesday, 31 May 2022 at 17:41:18 UTC, Don Allen wrote:
> This strikes me as pretty inconsistent behavior, especially to 
> someone who has written as much Scheme and Haskell as I have. 
> I've also not found it documented, though I could have missed 
> it (if someone could point me to where this is discussed, I'd 
> appreciate it). My main purpose in sending this message is to 
> understand whether this is a bug or a documented "feature". If 
> the former, I will file a bug report.

This behavior (along with several workarounds) is documented in 
the spec here:

https://dlang.org/spec/function.html#nested-declaration-order


More information about the Digitalmars-d mailing list