mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove obsolete createTypeError in AST
This commit is contained in:
parent
ed62b2583c
commit
475b818801
@ -22,7 +22,6 @@
|
||||
|
||||
#include <libsolidity/ast/AST.h>
|
||||
#include <libsolidity/ast/ASTVisitor.h>
|
||||
#include <libsolidity/interface/Exceptions.h>
|
||||
#include <libsolidity/ast/AST_accept.h>
|
||||
|
||||
#include <libdevcore/SHA3.h>
|
||||
@ -73,11 +72,6 @@ ASTAnnotation& ASTNode::annotation() const
|
||||
return *m_annotation;
|
||||
}
|
||||
|
||||
Error ASTNode::createTypeError(string const& _description) const
|
||||
{
|
||||
return Error(Error::Type::TypeError) << errinfo_sourceLocation(location()) << errinfo_comment(_description);
|
||||
}
|
||||
|
||||
SourceUnitAnnotation& SourceUnit::annotation() const
|
||||
{
|
||||
if (!m_annotation)
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <libsolidity/ast/ASTForward.h>
|
||||
#include <libsolidity/parsing/Token.h>
|
||||
#include <libsolidity/ast/Types.h>
|
||||
#include <libsolidity/interface/Exceptions.h>
|
||||
#include <libsolidity/ast/ASTAnnotations.h>
|
||||
#include <libsolidity/ast/ASTEnums.h>
|
||||
|
||||
@ -89,10 +88,6 @@ public:
|
||||
/// Returns the source code location of this node.
|
||||
SourceLocation const& location() const { return m_location; }
|
||||
|
||||
/// Creates a @ref TypeError exception and decorates it with the location of the node and
|
||||
/// the given description
|
||||
Error createTypeError(std::string const& _description) const;
|
||||
|
||||
///@todo make this const-safe by providing a different way to access the annotation
|
||||
virtual ASTAnnotation& annotation() const;
|
||||
|
||||
|
@ -2025,7 +2025,7 @@ unsigned EnumType::memberValue(ASTString const& _member) const
|
||||
return index;
|
||||
++index;
|
||||
}
|
||||
BOOST_THROW_EXCEPTION(m_enum.createTypeError("Requested unknown enum value ." + _member));
|
||||
solAssert(false, "Requested unknown enum value " + _member);
|
||||
}
|
||||
|
||||
bool TupleType::isImplicitlyConvertibleTo(Type const& _other) const
|
||||
|
Loading…
Reference in New Issue
Block a user