From 16a91ef90aaf589361e34a10dcee2181ba6cb2ed Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 15 Feb 2017 11:43:26 +0000 Subject: Use declared instead of defined --- libsolidity/analysis/TypeChecker.cpp | 2 +- test/libsolidity/SolidityNameAndTypeResolution.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index 889b72b9..f6e4d6c8 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -469,7 +469,7 @@ bool TypeChecker::visit(FunctionDefinition const& _function) bool TypeChecker::visit(VariableDeclaration const& _variable) { 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 // sets the type. diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 0861dded..c30bb011 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -5408,7 +5408,7 @@ BOOST_AUTO_TEST_CASE(interface_variables) 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) -- cgit v1.2.3