Kaydet (Commit) 652b0b6d authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Certain UNOIDL typedefs are forbidden for historic reasons

Change-Id: I0fb4ca4e529f5f35e3619bab5e89348dd9c67faf
üst 13e8e9e2
......@@ -1810,8 +1810,23 @@ typedefDefn:
deprecated_opt published_opt TOK_TYPEDEF type identifier ';'
{
unoidl::detail::SourceProviderScannerData * data = yyget_extra(yyscanner);
unoidl::detail::SourceProviderType t(*$4); //TODO: service/singleton typedefs?
unoidl::detail::SourceProviderType t(*$4);
delete $4;
// There is no good reason to forbid typedefs to VOID and to instantiated
// polymorphic struct types, but some old client code of registry data
// expects this typedef restriction (like the assert(false) default in
// handleTypedef in codemaker/source/javamaker/javatype.cxx), so forbid
// them for now:
switch (t.type) {
case unoidl::detail::SourceProviderType::TYPE_VOID:
case unoidl::detail::SourceProviderType::TYPE_INSTANTIATED_POLYMORPHIC_STRUCT:
error(@4, yyscanner, "bad typedef type");
YYERROR;
case unoidl::detail::SourceProviderType::TYPE_PARAMETER:
assert(false); // this cannot happen
default:
break;
}
OUString name(convertToFullName(data, $5));
if (!data->entities.insert(
std::map<OUString, unoidl::detail::SourceProviderEntity>::value_type(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment