mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Introduce emit statement.
This commit is contained in:
1 parent
8fc9535d43
commit
388718b59f
17 files changed
+252
-3
No files matched your search
@@ -955,6 +955,15 @@ void TypeChecker::endVisit(Return const& _return)
|
||||
}
|
||||
}
|
||||
|
||||
void TypeChecker::endVisit(EmitStatement const& _emit)
|
||||
{
|
||||
if (
|
||||
_emit.eventCall().annotation().kind != FunctionCallKind::FunctionCall ||
|
||||
dynamic_cast<FunctionType const&>(*type(_emit.eventCall().expression())).kind() != FunctionType::Kind::Event
|
||||
)
|
||||
m_errorReporter.typeError(_emit.eventCall().expression().location(), "Expression has to be an event.");
|
||||
}
|
||||
|
||||
bool TypeChecker::visit(VariableDeclarationStatement const& _statement)
|
||||
{
|
||||
if (!_statement.initialValue())
|
||||
|
||||
Reference in new issue
Block a user