mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
committed by
chriseth
parent
9f8d49e358
commit
21844aa545
@@ -981,7 +981,6 @@ void TypeChecker::endVisit(EmitStatement const& _emit)
|
||||
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 invocation.");
|
||||
m_insideEmitStatement = false;
|
||||
}
|
||||
|
||||
namespace
|
||||
@@ -1715,13 +1714,6 @@ void TypeChecker::typeCheckFunctionCall(
|
||||
"\"staticcall\" is not supported by the VM version."
|
||||
);
|
||||
|
||||
// Check for event outside of emit statement
|
||||
if (!m_insideEmitStatement && _functionType->kind() == FunctionType::Kind::Event)
|
||||
m_errorReporter.typeError(
|
||||
_functionCall.location(),
|
||||
"Event invocations have to be prefixed by \"emit\"."
|
||||
);
|
||||
|
||||
// Perform standard function call type checking
|
||||
typeCheckFunctionGeneralChecks(_functionCall, _functionType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user