mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11079 from ethereum/fix-visibility-warning
AST import: constructors have default visibility
This commit is contained in:
commit
0e22d0bd40
@ -9,6 +9,7 @@ Compiler Features:
|
|||||||
|
|
||||||
|
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
* AST Import: For constructors, a public visibility is ignored during importing.
|
||||||
* Error Reporter: Fix handling of carriage return.
|
* Error Reporter: Fix handling of carriage return.
|
||||||
* SMTChecker: Fix internal error on ``array.pop`` nested inside 1-tuple.
|
* SMTChecker: Fix internal error on ``array.pop`` nested inside 1-tuple.
|
||||||
* SMTChecker: Fix internal error on ``FixedBytes`` constant initialized with string literal.
|
* SMTChecker: Fix internal error on ``FixedBytes`` constant initialized with string literal.
|
||||||
|
@ -440,7 +440,10 @@ ASTPointer<FunctionDefinition> ASTJsonImporter::createFunctionDefinition(Json::V
|
|||||||
modifiers.push_back(createModifierInvocation(mod));
|
modifiers.push_back(createModifierInvocation(mod));
|
||||||
|
|
||||||
Visibility vis = Visibility::Default;
|
Visibility vis = Visibility::Default;
|
||||||
if (!freeFunction)
|
// Ignore public visibility for constructors
|
||||||
|
if (kind == Token::Constructor)
|
||||||
|
vis = (visibility(_node) == Visibility::Public) ? Visibility::Default : visibility(_node);
|
||||||
|
else if (!freeFunction)
|
||||||
vis = visibility(_node);
|
vis = visibility(_node);
|
||||||
return createASTNode<FunctionDefinition>(
|
return createASTNode<FunctionDefinition>(
|
||||||
_node,
|
_node,
|
||||||
|
Loading…
Reference in New Issue
Block a user