diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp index 0ce19ecd1..cd133222c 100644 --- a/ExpressionCompiler.cpp +++ b/ExpressionCompiler.cpp @@ -860,8 +860,8 @@ unsigned ExpressionCompiler::appendArgumentsCopyToMemory(vector 32) BOOST_THROW_EXCEPTION(CompilerError() << errinfo_sourceLocation(_location) diff --git a/Types.cpp b/Types.cpp index a9051a2ca..6a1282027 100644 --- a/Types.cpp +++ b/Types.cpp @@ -364,8 +364,7 @@ u256 IntegerConstantType::literalValue(Literal const* _literal) const TypePointer IntegerConstantType::getRealType() const { auto intType = getIntegerType(); - if (!intType) - BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("getRealType called with invalid integer constant" + toString())); + solAssert(!!intType, std::string("getRealType called with invalid integer constant") + toString()); return intType; } diff --git a/Types.h b/Types.h index 677e5e49e..fcd6d9560 100644 --- a/Types.h +++ b/Types.h @@ -131,7 +131,7 @@ public: virtual bool isValueType() const { return false; } virtual unsigned getSizeOnStack() const { return 1; } /// @returns the real type of some types, like e.g: IntegerConstant - virtual TypePointer getRealType() const { return TypePointer(); } + virtual TypePointer getRealType() const { return shared_from_this(); } /// Returns the list of all members of this type. Default implementation: no members. virtual MemberList const& getMembers() const { return EmptyMemberList; }