Disallow using reserved identifiers in Yul

This commit is contained in:
Alex Beregszaszi 2020-07-29 18:55:04 +01:00 committed by chriseth
parent 7df986539f
commit 2b09fa14e1

View File

@ -570,6 +570,12 @@ void AsmAnalyzer::expectValidIdentifier(YulString _identifier, SourceLocation co
"\"" + _identifier.str() + "\" is not a valid identifier (contains consecutive dots)."
);
if (m_dialect.reservedIdentifier(_identifier))
m_errorReporter.declarationError(
5017_error,
_location,
"The identifier \"" + _identifier.str() + "\" is reserved and can not be used."
);
}
void AsmAnalyzer::expectValidType(YulString _type, SourceLocation const& _location)