diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-02-14 19:48:10 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-02-14 19:48:10 -0800 |
commit | b86707a91d3ccd80b48f354f74f9cd1607bc78e9 (patch) | |
tree | 9f514d45a91e0051326806f90cdb442f51bc20dd | |
parent | fe2725d9eecb8db27729b36a5d6f715478c3acc7 (diff) | |
download | mu-b86707a91d3ccd80b48f354f74f9cd1607bc78e9.tar.gz |
2654
-rw-r--r-- | 058shape_shifting_container.cc | 2 |
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); |