Re: [patch] Perform a namespace lookup at every block level

Sami Wagiaalla
2009-07-13T17:03:44Z

> Where in the overall search order are block-level using directives
> supposed to fall according to the standard? And where does this patch
> put them?
>
> It looks to me like this change causes the global scope to be searched
> too early (and too often). Given this:
>

Yes, it is searched too early.
imports such as:

using namespace A

should not be applied until the function level lookup fails.
However, imports of type:

using A::a

are applied at the block level and take priority over higher lexical
scope variables. So they will require per-block lookup, but that is
another patch for another feature.

I will correct this patch.

Sami