diff options
author | chriseth <chris@ethereum.org> | 2017-09-12 19:28:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-12 19:28:49 +0800 |
commit | ac3742cd25ac59800aa98a5c5cc35820f511a5ae (patch) | |
tree | 86b9c5caa2f281eec9b1a52ac20d2f5280e3b884 | |
parent | aaf73071dbf4864097525e4bec62322502591b21 (diff) | |
parent | a03211f3c9920499837fe11edef8c030c772181a (diff) | |
download | dexon-solidity-ac3742cd25ac59800aa98a5c5cc35820f511a5ae.tar.gz dexon-solidity-ac3742cd25ac59800aa98a5c5cc35820f511a5ae.tar.zst dexon-solidity-ac3742cd25ac59800aa98a5c5cc35820f511a5ae.zip |
Merge pull request #2887 from ethereum/missing-functions-list
Show each unimplemented function in secondary source location
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index d2151cda..8e1d11a1 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -458,7 +458,7 @@ void TypeChecker::endVisit(InheritanceSpecifier const& _inheritance) " to " + parameterTypes[i]->toString() + " requested." - ); + ); } void TypeChecker::endVisit(UsingForDirective const& _usingFor) @@ -1583,14 +1583,16 @@ void TypeChecker::endVisit(NewExpression const& _newExpression) if (contract->contractKind() == ContractDefinition::ContractKind::Interface) m_errorReporter.fatalTypeError(_newExpression.location(), "Cannot instantiate an interface."); if (!contract->annotation().unimplementedFunctions.empty()) + { + SecondarySourceLocation ssl; + for (auto function: contract->annotation().unimplementedFunctions) + ssl.append("Missing implementation:", function->location()); m_errorReporter.typeError( _newExpression.location(), - SecondarySourceLocation().append( - "Missing implementation:", - contract->annotation().unimplementedFunctions.front()->location() - ), + ssl, "Trying to create an instance of an abstract contract." ); + } if (!contract->constructorIsPublic()) m_errorReporter.typeError(_newExpression.location(), "Contract with internal constructor cannot be created directly."); |