Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues

Bug 231

Summary: forward declarations with reserved word cause idl compiler to fail
Product: JacORB Reporter: z <zeyu>
Component: IDL compilerAssignee: Gerald Brose <gerald.brose>
Status: RESOLVED FIXED    
Severity: major CC: andrej, emalmstrom
Priority: P2    
Version: 1.4 beta 4   
Hardware: All   
OS: All   

Description z 2002-07-24 04:31:49 UTC
compiling the following simple idl:
================================
module A {
    interface Holder;
};

interface B {
    typedef A::Holder ap;
    attribute ap bp;
};
================================
with "-sloppy_forward -W 4" option you get:


   [ /tmp/p.idl ]
   [ checking module name A ]
   [ ScopedName.setId A ]
   [ ScopedName.setId A.Holder ]
   [ ScopedName.escapeName A._Holder ]
   [ ScopedName.setId ap ]
   [ NameTable.define2: putting A kind module hash: 65 ]
   [ NameTable.checkScopingRules:  A kind: module ]
   [ NameTable.checkScopingRules2:  A kind: module ]
   [ NameTable.define2: putting A.Holder kind interface hash: 1656144921 ]
   [ NameTable.checkScopingRules:  A.Holder kind: interface ]
   [ NameTable.checkScopingRules2:  A.Holder kind: interface ]
   [ Typedef'ing A.Holder for  , hash: 503498 ]
   [ NameTable.define2: putting B kind interface hash: 66 ]
   [ NameTable.checkScopingRules:  B kind: interface ]
   [ NameTable.checkScopingRules2:  B kind: interface ]
   [ Typedef'ing B for  , hash: 6589979 ]
   [ Interface Body parse B ]
   [ Interface Body internal_parse B ]
   [ Resolve B:A._Holder ]
Error in p.idl, line:6(22): Undefined name: B.A._Holder
	    typedef A::Holder
Can't recover from previous error(s), giving up.

The same thing happens to all other keywords such as Helper, POA, POATie, 
Package.
Comment 1 Gerald Brose 2003-01-11 12:14:33 UTC
(Internal: fixed src/org/jacorb/idl/ScopedName.java, which incorrectly 
escaped the IDL name "A::Holder").
Comment 2 Nick Cross 2003-06-09 16:09:14 UTC
*** Bug 247 has been marked as a duplicate of this bug. ***
Comment 3 Nick Cross 2003-08-01 16:47:45 UTC
*** Bug 362 has been marked as a duplicate of this bug. ***