about summary refs log tree commit diff stats
path: root/058shape_shifting_container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-02-14 19:48:10 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-02-14 19:48:10 -0800
commitb86707a91d3ccd80b48f354f74f9cd1607bc78e9 (patch)
tree9f514d45a91e0051326806f90cdb442f51bc20dd /058shape_shifting_container.cc
parentfe2725d9eecb8db27729b36a5d6f715478c3acc7 (diff)
downloadmu-b86707a91d3ccd80b48f354f74f9cd1607bc78e9.tar.gz
2654
Diffstat (limited to '058shape_shifting_container.cc')
-rw-r--r--058shape_shifting_container.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/058shape_shifting_container.cc b/058shape_shifting_container.cc
index c9975b44..acdd4081 100644
--- a/058shape_shifting_container.cc
+++ b/058shape_shifting_container.cc
@@ -173,7 +173,9 @@ void replace_type_ingredient(type_tree* element_type, const type_tree* callsite_
     }
     const type_tree* replacement = nth_type(callsite_type, element_type->value-START_TYPE_INGREDIENTS);
     element_type->value = replacement->value;
+    assert(!element_type->left);  // since value is set
     element_type->left = replacement->left ? new type_tree(*replacement->left) : NULL;
+    assert(!element_type->right);  // unsupported
     element_type->right = replacement->right ? new type_tree(*replacement->right) : NULL;
   }
   replace_type_ingredient(element_type->right, callsite_type);