mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #9954 from ethereum/issue-9948
Remove unneeded assert
This commit is contained in:
commit
25d408058b
@ -1124,11 +1124,6 @@ void CompilerStack::storeContractDefinitions()
|
||||
// should already cause a double-declaration error elsewhere.
|
||||
if (!m_contracts.count(fullyQualifiedName))
|
||||
m_contracts[fullyQualifiedName].contract = contract;
|
||||
else
|
||||
solAssert(
|
||||
m_errorReporter.hasErrors(),
|
||||
"Contract already present (name clash?), but no error was reported."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
4
test/libsolidity/syntaxTests/duplicate_contract.sol
Normal file
4
test/libsolidity/syntaxTests/duplicate_contract.sol
Normal file
@ -0,0 +1,4 @@
|
||||
contract X {}
|
||||
contract X {}
|
||||
// ----
|
||||
// DeclarationError 2333: (14-27): Identifier already declared.
|
Loading…
Reference in New Issue
Block a user