about summary refs log tree commit diff stats
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/017record3
1 files changed, 3 insertions, 0 deletions
diff --git a/cpp/017record b/cpp/017record
index 3f5d9889..89516672 100644
--- a/cpp/017record
+++ b/cpp/017record
@@ -34,6 +34,7 @@ case GET: {
   trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name;
   int base_address = to_int(instructions[pc].ingredients[0].name);
   int base_type = instructions[pc].ingredients[0].types[0];
+  assert(Type[base_type].is_record);
   trace("run") << "ingredient 1 is " << instructions[pc].ingredients[1].name;
   assert(instructions[pc].ingredients[1].types.size() == 1);
   assert(instructions[pc].ingredients[1].types[0] == 0);  // must be literal
@@ -109,6 +110,8 @@ Next_recipe_number++;
 case GET_ADDRESS: {
   trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name;
   int base_address = to_int(instructions[pc].ingredients[0].name);
+  int base_type = instructions[pc].ingredients[0].types[0];
+  assert(Type[base_type].is_record);
   trace("run") << "ingredient 1 is " << instructions[pc].ingredients[1].name;
   assert(instructions[pc].ingredients[1].types.size() == 1);
   assert(instructions[pc].ingredients[1].types[0] == 0);  // must be literal