mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Deprecated identifier now
This commit is contained in:
parent
ecbf216354
commit
b5612f96c9
@ -2908,6 +2908,20 @@ bool TypeChecker::visit(Identifier const& _identifier)
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
MagicVariableDeclaration const* magicVar =
|
||||
dynamic_cast<MagicVariableDeclaration const*>(annotation.referencedDeclaration)
|
||||
)
|
||||
if (magicVar->type()->category() == Type::Category::Integer)
|
||||
{
|
||||
solAssert(_identifier.name() == "now", "");
|
||||
m_errorReporter
|
||||
.typeError(
|
||||
_identifier.location(),
|
||||
"\"now\" has been deprecated. Use \"block.timestamp\" instead."
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user