diff options
author | Federico Bond <federicobond@gmail.com> | 2017-07-18 06:12:34 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-12 05:45:25 +0800 |
commit | ff5bb54e3c19bedfadd06dd60f032fd7cdc55389 (patch) | |
tree | 8bbcfaedd172fa7cbbe34165d4dd71fdfb86f739 /libsolidity/analysis | |
parent | a5ceaac8df80f89112bb4d7bbfd9da165d370aa3 (diff) | |
download | dexon-solidity-ff5bb54e3c19bedfadd06dd60f032fd7cdc55389.tar dexon-solidity-ff5bb54e3c19bedfadd06dd60f032fd7cdc55389.tar.gz dexon-solidity-ff5bb54e3c19bedfadd06dd60f032fd7cdc55389.tar.bz2 dexon-solidity-ff5bb54e3c19bedfadd06dd60f032fd7cdc55389.tar.lz dexon-solidity-ff5bb54e3c19bedfadd06dd60f032fd7cdc55389.tar.xz dexon-solidity-ff5bb54e3c19bedfadd06dd60f032fd7cdc55389.tar.zst dexon-solidity-ff5bb54e3c19bedfadd06dd60f032fd7cdc55389.zip |
Use fully qualified name of super in message
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index a7433250..9bccac12 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -1950,13 +1950,12 @@ void TypeChecker::requireLValue(Expression const& _expression) m_errorReporter.typeError(_expression.location(), "Expression has to be an lvalue."); } - void TypeChecker::overrideTypeError(FunctionDefinition const& function, FunctionDefinition const& super) { string message; if (function.visibility() != super.visibility()) - message = "Overriding function visibility differs from extended function."; + message = "Overriding function visibility differs from " + super.fullyQualifiedName() + "."; else if (function.isDeclaredConst() && !super.isDeclaredConst()) message = "Overriding function should not be declared constant."; else if (!function.isDeclaredConst() && super.isDeclaredConst()) @@ -1972,11 +1971,11 @@ void TypeChecker::overrideTypeError(FunctionDefinition const& function, Function FunctionType superType(super); if (functionType != superType) - message = "Overriding function return types differ from extended function."; + message = "Overriding function return types differ from " + super.fullyQualifiedName() + "."; } if (message.empty()) - message = "Override changes extended function signature."; + message = "Overriding function signature differs from " + super.fullyQualifiedName() + "."; m_errorReporter.typeError(function.location(), message); } |