本文整理汇总了C++中Dsymbol::isInterfaceDeclaration方法的典型用法代码示例。如果您正苦于以下问题:C++ Dsymbol::isInterfaceDeclaration方法的具体用法?C++ Dsymbol::isInterfaceDeclaration怎么用?C++ Dsymbol::isInterfaceDeclaration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dsymbol
的用法示例。
在下文中一共展示了Dsymbol::isInterfaceDeclaration方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: semantic
//.........这里部分代码省略.........
{
error("override cannot be applied to variable");
}
else if (isAbstract())
{
error("abstract cannot be applied to variable");
}
else if (storage_class & STCtemplateparameter)
{
}
else if (storage_class & STCctfe)
{
}
else
{
AggregateDeclaration *aad = sc->anonAgg;
if (!aad)
aad = parent->isAggregateDeclaration();
if (aad)
{
#if DMDV2
assert(!(storage_class & (STCextern | STCstatic | STCtls | STCgshared)));
if (storage_class & (STCconst | STCimmutable) && init)
{
if (!type->toBasetype()->isTypeBasic())
storage_class |= STCstatic;
}
else
#endif
aad->addField(sc, this);
}
InterfaceDeclaration *id = parent->isInterfaceDeclaration();
if (id)
{
error("field not allowed in interface");
}
/* Templates cannot add fields to aggregates
*/
TemplateInstance *ti = parent->isTemplateInstance();
if (ti)
{
// Take care of nested templates
while (1)
{
TemplateInstance *ti2 = ti->tempdecl->parent->isTemplateInstance();
if (!ti2)
break;
ti = ti2;
}
// If it's a member template
AggregateDeclaration *ad = ti->tempdecl->isMember();
if (ad && storage_class != STCundefined)
{
error("cannot use template to add field to aggregate '%s'", ad->toChars());
}
}
}
#if DMDV2
if ((storage_class & (STCref | STCparameter | STCforeach)) == STCref &&
ident != Id::This)
{