2 guid: "4E9538F2-03E0-11DA-A88E-000A95BB581A";
12 // A.G is declared as a namespace; no attempt is made to look for
35 // Imports B and B.C, not B and C. If it were "using C.*, B.*",
36 // then it would import C and C.B.
42 // B b; // Error, Uses C.B, rule #2 once D is reached. Only the
43 // contents of namespaces are imported, not the
45 // C.D cd; // Error. For the same reason as above, C refers
46 // to B.C, not C. There is no D in B.C.
47 C.X cx; // Uses B.C.X.
48 D d; // Uses C.D, rule #2 when D is reached. D itself
49 // is declared in the global namespace, which doesn't
50 // get reached because a match is found sooner.
51 E e; // Uses D.E, rule #1 once D is reached. C.E would
52 // have been matched by rule #2 if D.E did not exist.
53 F f; // Uses C.F, rule #2 once D is reached. A.F is not
54 // matched, as importation is not transitive.
55 G g; // Uses B.G, rule #2
56 // H h; // Error, both B.H and C.H match on rule #2 once
57 // D is reached. B does not get precedence for
58 // coming first, or because the C importation
59 // comes after this lookup.
60 I i; // Uses B.I, as specific-symbol imports are treated
61 // as symbols declared in this namespace, rather than
62 // imports (and thus B.I has precedence over C.I).
65 // int I; // Error; this conflicts with the specific-symbol
66 // importation of B.I.
68 // Now C is imported. This importation is valid through the
69 // entire namespace (except for prior using statements), not just
100 // B b; // Error: Uses C.B, rule #1 once C is reached,
101 // but C.B is not a type
102 D d; // Uses C.D, rule #1 once C is reached
103 B.E be; // Uses C.B.E, rule #1 once C is reached
104 E e; // Uses C.B.E.E, rule #1 in current namespace
105 // E.E ee; // Error, as the first E matches C.B.E.E, and
106 // there is no C.B.E.E.E. The extra .E is
107 // not used for disambiguation.
108 F f; // Uses C.B.E.F, rule #1 in current namespace
109 // G g; // Error: Uses A.G, rule #2 once namespace C is reached.
110 H h; // Uses C.H, rule #1 once namespace C is reached.