From 4ecab1821ed7609d35f2c9509cb045dc79606e8c Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 8 Nov 2016 10:31:48 -0800 Subject: 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." --- 055shape_shifting_container.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '055shape_shifting_container.cc') 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 -- cgit 1.4.1-2-gfad0