mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Allow function overloads involving MagicVariableDeclarations.
This commit is contained in:
1 parent
17fc0f54b5
commit
f00bb43593
4 files changed
+18
-7
No files matched your search
@@ -45,7 +45,8 @@ Declaration const* DeclarationContainer::conflictingDeclaration(
|
||||
|
||||
if (
|
||||
dynamic_cast<FunctionDefinition const*>(&_declaration) ||
|
||||
dynamic_cast<EventDefinition const*>(&_declaration)
|
||||
dynamic_cast<EventDefinition const*>(&_declaration) ||
|
||||
dynamic_cast<MagicVariableDeclaration const*>(&_declaration)
|
||||
)
|
||||
{
|
||||
// check that all other declarations with the same name are functions or a public state variable or events.
|
||||
@@ -68,6 +69,11 @@ Declaration const* DeclarationContainer::conflictingDeclaration(
|
||||
!dynamic_cast<EventDefinition const*>(declaration)
|
||||
)
|
||||
return declaration;
|
||||
if (
|
||||
dynamic_cast<MagicVariableDeclaration const*>(&_declaration) &&
|
||||
!dynamic_cast<MagicVariableDeclaration const*>(declaration)
|
||||
)
|
||||
return declaration;
|
||||
// Or, continue.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user