aboutsummaryrefslogtreecommitdiffstats
path: root/LValue.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-06-09 20:26:08 +0800
committerchriseth <c@ethdev.com>2015-06-15 20:40:41 +0800
commit258b1a74e214a69b06e603849c76362aecfae0d5 (patch)
tree9d6794a4e0c2af5175f22bb5b2cdd258f0323031 /LValue.cpp
parentd60ef3f2d792989ebcbf3326bcf8fced6031b5b9 (diff)
downloaddexon-solidity-258b1a74e214a69b06e603849c76362aecfae0d5.tar
dexon-solidity-258b1a74e214a69b06e603849c76362aecfae0d5.tar.gz
dexon-solidity-258b1a74e214a69b06e603849c76362aecfae0d5.tar.bz2
dexon-solidity-258b1a74e214a69b06e603849c76362aecfae0d5.tar.lz
dexon-solidity-258b1a74e214a69b06e603849c76362aecfae0d5.tar.xz
dexon-solidity-258b1a74e214a69b06e603849c76362aecfae0d5.tar.zst
dexon-solidity-258b1a74e214a69b06e603849c76362aecfae0d5.zip
Distinction between storage pointer and storage ref and type checking for conversion between storage and memory.
Diffstat (limited to 'LValue.cpp')
-rw-r--r--LValue.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/LValue.cpp b/LValue.cpp
index b684e55a..1acf0a3e 100644
--- a/LValue.cpp
+++ b/LValue.cpp
@@ -198,7 +198,11 @@ void StorageItem::storeValue(Type const& _sourceType, SourceLocation const& _loc
// stack layout: source_ref source_offset target_ref target_offset
// note that we have structs, so offsets should be zero and are ignored
auto const& structType = dynamic_cast<StructType const&>(m_dataType);
- solAssert(structType == _sourceType, "Struct assignment with conversion.");
+ solAssert(
+ structType.structDefinition() ==
+ dynamic_cast<StructType const&>(_sourceType).structDefinition(),
+ "Struct assignment with conversion."
+ );
for (auto const& member: structType.getMembers())
{
// assign each member that is not a mapping