mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #10999 from ethereum/hash-collision-throw
Converted hash collision error into a fatal type error.
This commit is contained in:
commit
92b52cbf84
@ -14,6 +14,7 @@ Bugfixes:
|
||||
* SMTChecker: Fix missing type constraints on block and transaction variables in the deployment phase.
|
||||
* AST: Added ``referencedDeclaration`` for enum members.
|
||||
* Code Generator: Fix internal error when functions are passed as parameters of other callables, when the function types can be implicitly converted, but not identical.
|
||||
* Type Checker: Make function-hash collision errors into fatal type errors.
|
||||
|
||||
|
||||
AST Changes:
|
||||
|
@ -426,7 +426,7 @@ void ContractLevelChecker::checkHashCollisions(ContractDefinition const& _contra
|
||||
{
|
||||
util::FixedHash<4> const& hash = it.first;
|
||||
if (hashes.count(hash))
|
||||
m_errorReporter.typeError(
|
||||
m_errorReporter.fatalTypeError(
|
||||
1860_error,
|
||||
_contract.location(),
|
||||
string("Function signature hash collision for ") + it.second->externalSignature()
|
||||
|
@ -0,0 +1,13 @@
|
||||
// This contract used to throw
|
||||
abstract contract D {
|
||||
function gsf() public {}
|
||||
function tgeo() public {}
|
||||
}
|
||||
contract C {
|
||||
D d;
|
||||
function g() public returns (uint) {
|
||||
d.d;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 1860: (31-113): Function signature hash collision for tgeo()
|
Loading…
Reference in New Issue
Block a user