about summary refs log tree commit diff stats
path: root/055shape_shifting_container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-06-24 09:23:42 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-06-24 11:28:34 -0700
commitc4cff3b3555e509ecbefa3d2298a54758f687bf5 (patch)
tree5ae4277fa2967714c780fd77d51cfc3e52fb73ee /055shape_shifting_container.cc
parent985e0ffeef1ff72eef68966ec5fb8f5468e5ab41 (diff)
downloadmu-c4cff3b3555e509ecbefa3d2298a54758f687bf5.tar.gz
3949
Diffstat (limited to '055shape_shifting_container.cc')
-rw-r--r--055shape_shifting_container.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/055shape_shifting_container.cc b/055shape_shifting_container.cc
index 8a7d75e1..702f2842 100644
--- a/055shape_shifting_container.cc
+++ b/055shape_shifting_container.cc
@@ -617,6 +617,7 @@ void test_container_sizes_recursive_shape_shifting_container() {
 
 :(before "End compute_container_address_offsets Non-atom Special-cases")
 const type_tree* root = get_base_type(type);
+if (!contains_key(Type, root->value)) return;  // error raised elsewhere
 type_info& info = get(Type, root->value);
 if (info.kind == CONTAINER) {
   compute_container_address_offsets(info, type, location_for_error_messages);
@@ -681,6 +682,14 @@ def main [
 ]
 # no crash
 
+:(scenario typos_in_recipes)
+% Hide_errors = true;
+def foo [
+  local-scope
+  x:adress:array:number <- copy 0  # typo
+]
+# shouldn't crash
+
 //:: 'merge' on shape-shifting containers
 
 :(scenario merge_check_shape_shifting_container_containing_exclusive_container)