-
Notifications
You must be signed in to change notification settings - Fork 271
Open
Description
The specification currently states that use declarations bring a name into a scope, but that's not exactly true, as imports are not available prior to the use declaration.
namespace A {
class C {}
}
namespace B {
// Same scope, 'A\C' should be available right?!
$c = new C();
use A\C;
}
Without this restriction, an engine could theoretically make an initial pass to import names from all use declarations, and therefore prevent a name resolution error from occurring.
18-namespaces.md
A namespace-use-declaration imports — that is, makes available — one or more names into a scope, optionally giving them each an alias.
Metadata
Metadata
Assignees
Labels
No labels