ignore unused explicit references for functions

This commit is contained in:
Marc Zinnschlag 2014-02-12 13:53:59 +01:00
parent 6e2e4d1adf
commit a85d3c7dcb
4 changed files with 25 additions and 7 deletions

View file

@ -397,8 +397,15 @@ namespace Compiler
char returnType;
std::string argumentType;
if (extensions->isFunction (keyword, returnType, argumentType, true))
bool hasExplicit = true;
if (extensions->isFunction (keyword, returnType, argumentType, hasExplicit))
{
if (!hasExplicit)
{
getErrorHandler().warning ("stray explicit reference (ignoring it)", loc);
mExplicit.clear();
}
start();
mTokenLoc = loc;
@ -519,7 +526,9 @@ namespace Compiler
char returnType;
std::string argumentType;
if (extensions->isFunction (keyword, returnType, argumentType, false))
bool hasExplicit = false;
if (extensions->isFunction (keyword, returnType, argumentType, hasExplicit))
{
mTokenLoc = loc;
int optionals = parseArguments (argumentType, scanner);