mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix state variable parsing.
This commit is contained in:
parent
08e807aea0
commit
6d289783b4
@ -380,6 +380,14 @@ Parser::FunctionHeaderParserResult Parser::parseFunctionHeader(
|
||||
{
|
||||
if (result.visibility != Declaration::Visibility::Default)
|
||||
{
|
||||
// There is the special case of a public state variable of function type.
|
||||
// Detect this and return early.
|
||||
if (
|
||||
(result.visibility == Declaration::Visibility::External || result.visibility == Declaration::Visibility::Internal) &&
|
||||
result.modifiers.empty() &&
|
||||
result.name->empty()
|
||||
)
|
||||
break;
|
||||
parserError(string(
|
||||
"Visibility already specified as \"" +
|
||||
Declaration::visibilityToString(result.visibility) +
|
||||
|
Loading…
Reference in New Issue
Block a user