diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2017-03-09 00:49:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-09 00:49:14 +0800 |
commit | e364909e063cf95922b9611b3d25fb0a4199e43f (patch) | |
tree | b235903bb5c2825f5b99e1534c59a922350c4859 /libsolidity/analysis/TypeChecker.cpp | |
parent | 3f9a7758348a30c4c65a99054e1e1055d1bb20c0 (diff) | |
parent | a3cb69b14b13a64deda8a71387e480a0eec45698 (diff) | |
download | dexon-solidity-e364909e063cf95922b9611b3d25fb0a4199e43f.tar dexon-solidity-e364909e063cf95922b9611b3d25fb0a4199e43f.tar.gz dexon-solidity-e364909e063cf95922b9611b3d25fb0a4199e43f.tar.bz2 dexon-solidity-e364909e063cf95922b9611b3d25fb0a4199e43f.tar.lz dexon-solidity-e364909e063cf95922b9611b3d25fb0a4199e43f.tar.xz dexon-solidity-e364909e063cf95922b9611b3d25fb0a4199e43f.tar.zst dexon-solidity-e364909e063cf95922b9611b3d25fb0a4199e43f.zip |
Merge pull request #1747 from ethereum/fixICEInternalConstructor
Move privateness of constructor into AST itself.
Diffstat (limited to 'libsolidity/analysis/TypeChecker.cpp')
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index ad1abcfb..549cbcca 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -77,8 +77,6 @@ bool TypeChecker::visit(ContractDefinition const& _contract) FunctionDefinition const* function = _contract.constructor(); if (function) { - if (!function->isPublic()) - _contract.annotation().hasPublicConstructor = false; if (!function->returnParameters().empty()) typeError(function->returnParameterList()->location(), "Non-empty \"returns\" directive for constructor."); if (function->isDeclaredConst()) @@ -1305,7 +1303,7 @@ void TypeChecker::endVisit(NewExpression const& _newExpression) fatalTypeError(_newExpression.location(), "Identifier is not a contract."); if (!contract->annotation().isFullyImplemented) typeError(_newExpression.location(), "Trying to create an instance of an abstract contract."); - if (!contract->annotation().hasPublicConstructor) + if (!contract->constructorIsPublic()) typeError(_newExpression.location(), "Contract with internal constructor cannot be created directly."); solAssert(!!m_scope, ""); |