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>2016-11-08 10:31:48 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-11-08 10:31:48 -0800
commit4ecab1821ed7609d35f2c9509cb045dc79606e8c (patch)
treec5f7f3641fd24fac4c36139a81fcddd4dab188e5 /055shape_shifting_container.cc
parentf4647409b5fa658e463424c0a8249a4d72405d59 (diff)
downloadmu-4ecab1821ed7609d35f2c9509cb045dc79606e8c.tar.gz
3653
Don't crash on bad types.

I need to be more careful in distinguishing between the two causes of
constraint violations: bad input and internal bugs. Maybe I should
create a second assert() to indicate "this shouldn't really be an
assert, but I'm too lazy to think about it right now."
Diffstat (limited to '055shape_shifting_container.cc')
-rw-r--r--055shape_shifting_container.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/055shape_shifting_container.cc b/055shape_shifting_container.cc
index 707ac125..061cd0ef 100644
--- a/055shape_shifting_container.cc
+++ b/055shape_shifting_container.cc
@@ -20,6 +20,13 @@ if (!base_type->atom) base_type = base_type->left;
 :(after "Update MAYBE_CONVERT base_type in Check")
 if (!base_type->atom) base_type = base_type->left;
 
+:(scenario ill_formed_container)
+% Hide_errors = true;
+def main [
+  {1: ((foo) num)} <- copy 0
+]
+# no crash
+
 :(scenario size_of_shape_shifting_container)
 container foo:_t [
   x:_t