aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-09-21 22:02:26 +0800
committerGitHub <noreply@github.com>2018-09-21 22:02:26 +0800
commit8f96fe698df64b5f35b7177621d4861b85167957 (patch)
tree412b61541f3a84c5916081115cf250c623596743 /libsolidity
parentdc9853bb6e47e9774141813ad17691c78fdd204c (diff)
parent69ff61d149b6952b3ba149d35b66bac960234360 (diff)
downloaddexon-solidity-8f96fe698df64b5f35b7177621d4861b85167957.tar
dexon-solidity-8f96fe698df64b5f35b7177621d4861b85167957.tar.gz
dexon-solidity-8f96fe698df64b5f35b7177621d4861b85167957.tar.bz2
dexon-solidity-8f96fe698df64b5f35b7177621d4861b85167957.tar.lz
dexon-solidity-8f96fe698df64b5f35b7177621d4861b85167957.tar.xz
dexon-solidity-8f96fe698df64b5f35b7177621d4861b85167957.tar.zst
dexon-solidity-8f96fe698df64b5f35b7177621d4861b85167957.zip
Merge pull request #5049 from ethereum/structtype-assert-annotation
Add assertion for annotated type in Structtype::canBeUsedExternally
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/ast/Types.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index afedbb69..f49e1222 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -2126,8 +2126,11 @@ bool StructType::canBeUsedExternally(bool _inLibrary) const
// passed by value and thus the encoding does not differ, but it will disallow
// mappings.
for (auto const& var: m_struct.members())
+ {
+ solAssert(var->annotation().type, "");
if (!var->annotation().type->canBeUsedExternally(false))
return false;
+ }
}
return true;
}