aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-02-06 20:42:51 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-02-06 20:42:51 +0800
commit2c9ff4747d81a34125e976a65d6eca8cb5349c9d (patch)
treebd0962997535edd01c27d38957826cf2222332fe /Types.cpp
parent76c9f13626495e173ddf3fde301c526097f08651 (diff)
downloaddexon-solidity-2c9ff4747d81a34125e976a65d6eca8cb5349c9d.tar.gz
dexon-solidity-2c9ff4747d81a34125e976a65d6eca8cb5349c9d.tar.zst
dexon-solidity-2c9ff4747d81a34125e976a65d6eca8cb5349c9d.zip
getRealType() introduced
Diffstat (limited to 'Types.cpp')
-rw-r--r--Types.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Types.cpp b/Types.cpp
index 648cf9cb..a9051a2c 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -361,6 +361,14 @@ u256 IntegerConstantType::literalValue(Literal const* _literal) const
return value;
}
+TypePointer IntegerConstantType::getRealType() const
+{
+ auto intType = getIntegerType();
+ if (!intType)
+ BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("getRealType called with invalid integer constant" + toString()));
+ return intType;
+}
+
shared_ptr<IntegerType const> IntegerConstantType::getIntegerType() const
{
bigint value = m_value;