From d2470a3e39f5fb0ef4d06a2a6e1981f681477f28 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Tue, 18 Oct 2016 14:17:49 +0200 Subject: [PATCH] `super`'s size on stack is zero, because the expression compiler does not push an address. This is different from `this`, which is translated to `ADDRESS` instruction. --- libsolidity/ast/Types.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h index 9173f39a1..f65d25fbd 100644 --- a/libsolidity/ast/Types.h +++ b/libsolidity/ast/Types.h @@ -623,6 +623,7 @@ public: } virtual unsigned storageBytes() const override { return 20; } virtual bool canLiveOutsideStorage() const override { return true; } + virtual unsigned sizeOnStack() const override { return m_super ? 0 : 1; } virtual bool isValueType() const override { return true; } virtual std::string toString(bool _short) const override; virtual std::string canonicalName(bool _addDataLocation) const override;