Nested functions should be exempt from sequential visibility rules

Timon Gehr timon.gehr at gmx.ch
Tue Apr 3 04:58:01 PDT 2012


On 04/03/2012 01:55 PM, Don Clugston wrote:
> On 03/04/12 13:35, Timon Gehr wrote:
>> On 04/03/2012 01:08 PM, Don Clugston wrote:
>>>
>>> Y b() { ... }
>>> Y y = b();
>>> X x = ...
>>>
>>> Prove that y doesn't depend on x.
>>
>> Since only function declarations are immune to ordering rules, b cannot
>> forward reference x.
>
> But there could be another function a() which is below x, and which b()
> calls.

This scenario can be forbidden conservatively.


More information about the Digitalmars-d mailing list