Implement TODO: disallow 'def's with template arguments.

llvm-svn: 7409
This commit is contained in:
Chris Lattner 2003-07-30 04:31:17 +00:00
parent 1b145a54cb
commit c9dee67ab6
1 changed files with 6 additions and 1 deletions

View File

@ -432,7 +432,12 @@ ClassInst : CLASS ObjectBody {
};
DefInst : DEF ObjectBody {
// TODO: If ObjectBody has template arguments, it's an error.
if (!$2->getTemplateArgs().empty()) {
err() << "Def '" << $2->getName()
<< "' is not permitted to have template arguments!\n";
abort();
}
// If ObjectBody has template arguments, it's an error.
if (Records.getDef($2->getName())) {
err() << "Def '" << $2->getName() << "' already defined!\n";
abort();