diff options
Diffstat (limited to 'modules/TAO/TAO_IDL/fe/fe_declarator.cpp')
-rw-r--r-- | modules/TAO/TAO_IDL/fe/fe_declarator.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/modules/TAO/TAO_IDL/fe/fe_declarator.cpp b/modules/TAO/TAO_IDL/fe/fe_declarator.cpp index 10b6bbf2b2d..324f2dd4628 100644 --- a/modules/TAO/TAO_IDL/fe/fe_declarator.cpp +++ b/modules/TAO/TAO_IDL/fe/fe_declarator.cpp @@ -65,16 +65,15 @@ trademarks or registered trademarks of Sun Microsystems, Inc. */ #include "fe_declarator.h" + #include "ast_array.h" -#include "ast_type.h" +#include "ast_param_holder.h" + #include "utl_err.h" #include "global_extern.h" #include "nr_extern.h" -#include "ace/config-all.h" -ACE_RCSID (fe, - fe_declarator, - "$Id$") +#include "ace/config-all.h" FE_Declarator::FE_Declarator (UTL_ScopedName *n, DeclaratorType dt, @@ -97,6 +96,18 @@ FE_Declarator::compose (AST_Decl *d) idl_global->err ()->not_a_type (d); return 0; } + else if (ct->node_type () == AST_Decl::NT_param_holder) + { + AST_Param_Holder *ph = + AST_Param_Holder::narrow_from_decl (ct); + + // Every other template parameter kind is legal. + if (ph->info ()->type_ == AST_Decl::NT_const) + { + idl_global->err ()->not_a_type (d); + return 0; + } + } AST_Decl::NodeType nt = d->node_type (); |