Reimplemented Type::as*Type() using virtual methods.

This commit is contained in:
Roberto Raggi
2009-02-09 17:44:06 +01:00
parent ce22a96041
commit d01795d933
15 changed files with 175 additions and 181 deletions

View File

@@ -135,9 +135,12 @@ bool CheckDeclarator::visit(DeclaratorAST *ast)
// ### check the initializer
// FullySpecifiedType exprTy = semantic()->check(ast->initializer, _scope);
if (ast->initializer && _fullySpecifiedType->isFunction()) {
_fullySpecifiedType->asFunction()->setPureVirtual(true);
if (ast->initializer && _fullySpecifiedType) {
if (Function *funTy = _fullySpecifiedType->asFunctionType()) {
funTy->setPureVirtual(true);
}
}
return false;
}