aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorLeonardo Alt <leo@ethereum.org>2018-09-04 17:48:58 +0800
committerLeonardo Alt <leo@ethereum.org>2018-09-04 17:48:58 +0800
commit17176871ab4903498be0f9d62997ca1a9ace04d8 (patch)
tree7fc1d5e1f905fb271c5dcb6c6830cad615194674 /libsolidity
parent4522c804f342707ec2bb86a19735a4084108d96d (diff)
downloaddexon-solidity-17176871ab4903498be0f9d62997ca1a9ace04d8.tar.gz
dexon-solidity-17176871ab4903498be0f9d62997ca1a9ace04d8.tar.zst
dexon-solidity-17176871ab4903498be0f9d62997ca1a9ace04d8.zip
Changed error message and added tests
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/analysis/SyntaxChecker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp
index 1b5c00c4..ab883a21 100644
--- a/libsolidity/analysis/SyntaxChecker.cpp
+++ b/libsolidity/analysis/SyntaxChecker.cpp
@@ -142,7 +142,7 @@ void SyntaxChecker::checkSingleStatementVariableDeclaration(ASTNode const* _stat
{
auto varDecl = dynamic_cast<VariableDeclarationStatement const*>(_statement);
if (varDecl)
- m_errorReporter.syntaxError(_statement->location(), "Invalid variable declaration. Please declare it inside a block.");
+ m_errorReporter.syntaxError(_statement->location(), "Variable declarations can only be used inside blocks.");
}
bool SyntaxChecker::visit(IfStatement const& _ifStatement)