Use declared instead of defined

This commit is contained in:
Alex Beregszaszi 2017-02-15 11:43:26 +00:00
parent f8da9a8fd5
commit 16a91ef90a
2 changed files with 2 additions and 2 deletions

View File

@ -469,7 +469,7 @@ bool TypeChecker::visit(FunctionDefinition const& _function)
bool TypeChecker::visit(VariableDeclaration const& _variable) bool TypeChecker::visit(VariableDeclaration const& _variable)
{ {
if (m_scope->contractKind() == ContractDefinition::ContractKind::Interface) if (m_scope->contractKind() == ContractDefinition::ContractKind::Interface)
typeError(_variable.location(), "Variables cannot be defined in interfaces."); typeError(_variable.location(), "Variables cannot be declared in interfaces.");
// Variables can be declared without type (with "var"), in which case the first assignment // Variables can be declared without type (with "var"), in which case the first assignment
// sets the type. // sets the type.

View File

@ -5408,7 +5408,7 @@ BOOST_AUTO_TEST_CASE(interface_variables)
uint a; uint a;
} }
)"; )";
CHECK_ERROR(text, TypeError, "Variables cannot be defined in interfaces"); CHECK_ERROR(text, TypeError, "Variables cannot be declared in interfaces");
} }
BOOST_AUTO_TEST_CASE(using_interface) BOOST_AUTO_TEST_CASE(using_interface)