Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / IDL_Test / invalid_scoping2.idl
blob31ad7226f3c3510e0b77eff4bbc18dc34cefb866
2 //=============================================================================
3 /**
4 * @file invalid_scoping2.idl
6 * This file contains examples of IDL code that has
7 * caused problems in the past for the TAO IDL
8 * compiler. This test is to make sure the problems
9 * stay fixed.
11 //=============================================================================
14 // Ensure that scope ::A::B::target exists
15 // but doesn't contain enum numbers2.
16 // ::A::B::target should hide the ::A::target
17 // defined later when inside scope ::A::B.
18 module A {
19 module B {
20 module target {
21 enum numbers1 {
22 ONE
28 // Ensure that enum ::A::target::numbers2 exists
29 // which should not be found inside scope B due
30 // to the internal "target" module above.
31 module A {
32 module target {
33 enum numbers2 {
34 TWO
39 // Attempt to access global scope ::A::target::numbers2
40 // with a local (non-fully pathed) name target::numbers2
41 // from within ::A::B which DOES contain it's own target
42 // module that does NOT contain numbers2. THIS SHOULD NOT
43 // COMPILE OR LOCK-UP tao_idl. The two target modules are NOT
44 // the same module and thus the outer one is hidden by the
45 // closer local one.
46 module A {
47 module B {
48 typedef target::numbers2 myType;