aboutsummaryrefslogtreecommitdiffstats
path: root/Types.h
diff options
context:
space:
mode:
Diffstat (limited to 'Types.h')
-rw-r--r--Types.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Types.h b/Types.h
index 190134d7..4493b803 100644
--- a/Types.h
+++ b/Types.h
@@ -26,6 +26,7 @@
#include <string>
#include <boost/noncopyable.hpp>
#include <libdevcore/Common.h>
+#include <libsolidity/Exceptions.h>
#include <libsolidity/ASTForward.h>
#include <libsolidity/Token.h>
@@ -75,7 +76,11 @@ public:
virtual unsigned getCalldataEncodedSize() const { return 0; }
virtual std::string toString() const = 0;
- virtual u256 literalValue(Literal const&) const { assert(false); }
+ virtual u256 literalValue(Literal const&) const
+ {
+ BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Literal value requested "
+ "for type without literals."));
+ }
};
/**