mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Do not return after throw.
This commit is contained in:
parent
64a4d77c8b
commit
91f9a7b7c4
@ -56,7 +56,6 @@ shared_ptr<Type> Type::fromElementaryTypeName(Token::Value _typeToken)
|
|||||||
else
|
else
|
||||||
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Unable to convert elementary typename " +
|
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Unable to convert elementary typename " +
|
||||||
std::string(Token::toString(_typeToken)) + " to type."));
|
std::string(Token::toString(_typeToken)) + " to type."));
|
||||||
return shared_ptr<Type>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
shared_ptr<Type> Type::fromUserDefinedTypeName(UserDefinedTypeName const& _typeName)
|
shared_ptr<Type> Type::fromUserDefinedTypeName(UserDefinedTypeName const& _typeName)
|
||||||
@ -67,7 +66,6 @@ shared_ptr<Type> Type::fromUserDefinedTypeName(UserDefinedTypeName const& _typeN
|
|||||||
shared_ptr<Type> Type::fromMapping(Mapping const&)
|
shared_ptr<Type> Type::fromMapping(Mapping const&)
|
||||||
{
|
{
|
||||||
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Mapping types not yet implemented."));
|
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Mapping types not yet implemented."));
|
||||||
return shared_ptr<Type>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
shared_ptr<Type> Type::forLiteral(Literal const& _literal)
|
shared_ptr<Type> Type::forLiteral(Literal const& _literal)
|
||||||
|
6
Types.h
6
Types.h
@ -201,7 +201,7 @@ public:
|
|||||||
|
|
||||||
virtual bool operator==(Type const& _other) const override;
|
virtual bool operator==(Type const& _other) const override;
|
||||||
virtual std::string toString() const override { return "function(...)returns(...)"; }
|
virtual std::string toString() const override { return "function(...)returns(...)"; }
|
||||||
virtual u256 getStorageSize() const { BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Storage size of non-storable function type requested.")); return 1; }
|
virtual u256 getStorageSize() const { BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Storage size of non-storable function type requested.")); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FunctionDefinition const& m_function;
|
FunctionDefinition const& m_function;
|
||||||
@ -235,7 +235,7 @@ public:
|
|||||||
VoidType() {}
|
VoidType() {}
|
||||||
|
|
||||||
virtual std::string toString() const override { return "void"; }
|
virtual std::string toString() const override { return "void"; }
|
||||||
virtual u256 getStorageSize() const { BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Storage size of non-storable void type requested.")); return 1; }
|
virtual u256 getStorageSize() const { BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Storage size of non-storable void type requested.")); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -251,7 +251,7 @@ public:
|
|||||||
std::shared_ptr<Type const> const& getActualType() const { return m_actualType; }
|
std::shared_ptr<Type const> const& getActualType() const { return m_actualType; }
|
||||||
|
|
||||||
virtual bool operator==(Type const& _other) const override;
|
virtual bool operator==(Type const& _other) const override;
|
||||||
virtual u256 getStorageSize() const { BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Storage size of non-storable type type requested.")); return 1; }
|
virtual u256 getStorageSize() const { BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Storage size of non-storable type type requested.")); }
|
||||||
virtual std::string toString() const override { return "type(" + m_actualType->toString() + ")"; }
|
virtual std::string toString() const override { return "type(" + m_actualType->toString() + ")"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user