https://issues.dlang.org/show_bug.cgi?id=20674

Dennis <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #3 from Dennis <[email protected]> ---
(In reply to Walter Bright from comment #1)
> To do what this example asks for, data flow analysis would be required. This
> can be done, but is a large increase in implementation complexity and time
> to compile.

This puzzles me. The examples don't contain a single branch or loop. Surely you
can infer scope here without creating a control-flow graph, right? Also, while
I don't know exactly how the current inference works (it's not documented
anywhere), it looks like it has a pretty complex loop already:

https://github.com/dlang/dmd/blob/8884ad0d232d300b424c025cf65ecd2623ec8df5/src/dmd/escape.d#L2176

--

Reply via email to