Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 231 - forward declarations with reserved word cause idl compiler to fail
Summary: forward declarations with reserved word cause idl compiler to fail
Status: RESOLVED FIXED
Alias: None
Product: JacORB
Classification: Unclassified
Component: IDL compiler (show other bugs)
Version: 1.4 beta 4
Hardware: All All
: P2 major
Assignee: Gerald Brose
URL:
: 247 362 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-07-24 04:31 CEST by z
Modified: 2003-08-01 16:47 CEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description z 2002-07-24 04:31:49 CEST
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 CET
(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 CEST
*** Bug 247 has been marked as a duplicate of this bug. ***
Comment 3 Nick Cross 2003-08-01 16:47:45 CEST
*** Bug 362 has been marked as a duplicate of this bug. ***