[Issue 16043] Wrong line number for closure in -vgc
digitalmars-d-bugs at puremagic.com
Wed May 18 09:18:44 PDT 2016
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
The shown line number is not wrong.
The closure environment that is closing variable foo, is allocated at the start
of function test() == line 1. The delegate literal at line 4 just refers it.
So, the issue would be:
1. the message text that is not enough helpful (diagnostic), or
2. lack of information about the location where the closed variable 'foo' is
used from (enhancement).
More information about the Digitalmars-d-bugs