Skip to content

Commit

Permalink
Add a trait to indicate if a function is override.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-carlborg committed Jul 19, 2013
1 parent 3ea68ad commit 2eb2f1d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/idgen.c
Expand Up @@ -341,6 +341,7 @@ Msgtable msgtable[] =
{ "parameters" },
{ "getAttributes" },
{ "getUnitTests" },
{ "isOverrideFunction" },
};


Expand Down
5 changes: 5 additions & 0 deletions src/traits.c
Expand Up @@ -743,6 +743,11 @@ Expression *TraitsExp::semantic(Scope *sc)
TupleExp *tup = new TupleExp(loc, unitTests);
return tup->semantic(sc);
}
else if (ident == Id::isOverrideFunction)
{
FuncDeclaration *f;
ISDSYMBOL((f = s->isFuncDeclaration()) != NULL && f->isOverride())
}
else
{ error("unrecognized trait %s", ident->toChars());
goto Lfalse;
Expand Down

0 comments on commit 2eb2f1d

Please sign in to comment.