mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fixing new abstract contract error location reporting
This commit is contained in:
parent
52a442a100
commit
0c296cd809
2
AST.cpp
2
AST.cpp
@ -728,7 +728,7 @@ void NewExpression::checkTypeRequirements()
|
|||||||
if (!m_contract)
|
if (!m_contract)
|
||||||
BOOST_THROW_EXCEPTION(createTypeError("Identifier is not a contract."));
|
BOOST_THROW_EXCEPTION(createTypeError("Identifier is not a contract."));
|
||||||
if (!m_contract->isFullyImplemented())
|
if (!m_contract->isFullyImplemented())
|
||||||
BOOST_THROW_EXCEPTION(m_contract->createTypeError("Trying to create an instance of an abstract contract."));
|
BOOST_THROW_EXCEPTION(createTypeError("Trying to create an instance of an abstract contract."));
|
||||||
shared_ptr<ContractType const> contractType = make_shared<ContractType>(*m_contract);
|
shared_ptr<ContractType const> contractType = make_shared<ContractType>(*m_contract);
|
||||||
TypePointers const& parameterTypes = contractType->getConstructorType()->getParameterTypes();
|
TypePointers const& parameterTypes = contractType->getConstructorType()->getParameterTypes();
|
||||||
m_type = make_shared<FunctionType>(parameterTypes, TypePointers{contractType},
|
m_type = make_shared<FunctionType>(parameterTypes, TypePointers{contractType},
|
||||||
|
Loading…
Reference in New Issue
Block a user