summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2012-05-02 17:06:08 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2012-05-02 17:06:08 +0000
commitbee94a19a2cd69cf35d06e2f01dddee78af95fe9 (patch)
treefe58eb13d7ffce1c4e9833045a6fa2fb6971ce20 /TAO
parent5f59196eee4d4dcc64a64cc19489896a6ec3bf36 (diff)
downloadATCD-bee94a19a2cd69cf35d06e2f01dddee78af95fe9.tar.gz
Wed May 2 17:00:56 UTC 2012 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'TAO')
-rw-r--r--TAO/ChangeLog14
-rw-r--r--TAO/TAO_IDL/fe/fe_utils.cpp2
-rw-r--r--TAO/tests/IDL_Test/included.idl20
-rw-r--r--TAO/tests/IDL_Test/including.idl20
4 files changed, 56 insertions, 0 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 2877f874509..689c7adef42 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,17 @@
+Wed May 2 17:00:56 UTC 2012 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/fe/fe_utils.cpp(can_be_redefined): Changes to accept
+ as legal IDL the same enum values in a different enum type
+ defined inside an interface derived from the one containing
+ the original enum values, all in reopenings of nested modules
+ in different IDL files. Thanks to Markus Manck <Markus.Manck@Philotech.de>
+ for reporting the bug and sending in an example in IDL.
+
+ * tests/IDL_Test/indluded.idl:
+ * tests/IDL_Test/including.idl:
+
+ Added test case based on above example IDL.
+
Sun Apr 15 12:36:06 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl>
* TAO_IDL/be/be_visitor_interface/ami4ccm_sendc_ex_idl.cpp:
diff --git a/TAO/TAO_IDL/fe/fe_utils.cpp b/TAO/TAO_IDL/fe/fe_utils.cpp
index a77f9d2d1d5..7040f24288c 100644
--- a/TAO/TAO_IDL/fe/fe_utils.cpp
+++ b/TAO/TAO_IDL/fe/fe_utils.cpp
@@ -898,6 +898,8 @@ FE_Utils::can_be_redefined (AST_Decl *prev_decl,
case AST_Decl::NT_const:
case AST_Decl::NT_factory:
case AST_Decl::NT_type:
+ case AST_Decl::NT_enum:
+ case AST_Decl::NT_enum_val:
{
return !s_eq;
}
diff --git a/TAO/tests/IDL_Test/included.idl b/TAO/tests/IDL_Test/included.idl
index bc528c63396..a70c4c91568 100644
--- a/TAO/tests/IDL_Test/included.idl
+++ b/TAO/tests/IDL_Test/included.idl
@@ -68,4 +68,24 @@ module A
};
};
+// A different enum with the same enum values is
+// defined in a derived interface in the same scope
+// in another IDL file that includes this one. The
+// construction is legal and should be accepted.
+module RootModule
+{
+ module SUBMODULE1
+ {
+ interface ParentIF
+ {
+ enum Mode
+ {
+ NORMAL,
+ FAULTY,
+ UNKNOWN
+ };
+ };
+ };
+};
+
#endif /* IDL_TEST_INCLUDED_IDL */
diff --git a/TAO/tests/IDL_Test/including.idl b/TAO/tests/IDL_Test/including.idl
index 482aebfd071..7a103555398 100644
--- a/TAO/tests/IDL_Test/including.idl
+++ b/TAO/tests/IDL_Test/including.idl
@@ -96,5 +96,25 @@ interface MyInt
A::MyStructA op (in A::MyStructA ab);
};
+// A different enum with the same enum values is
+// defined in the base interface in the same scope
+// in another IDL file included by this one. The
+// construction is legal and should be accepted.
+module RootModule
+{
+ module SUBMODULE1
+ {
+ interface ChildIF : ParentIF
+ {
+ enum DifferentMode
+ {
+ NORMAL,
+ FAULTY,
+ UNKNOWN
+ };
+ };
+ };
+};
+
#endif /* IDL_TEST_INCLUDING_IDL */