about summary refs log tree commit diff stats
path: root/032array.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-02-20 08:54:42 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-02-20 08:54:42 -0800
commit343bc5359b93d4b589544671804f11d42f67d694 (patch)
tree1725c408df8841a945931beb55c8976558bea230 /032array.cc
parent41e6effbbe61951f62ec000c676f625793044549 (diff)
downloadmu-343bc5359b93d4b589544671804f11d42f67d694.tar.gz
2677
Include type names in the type tree. Though we aren't using them yet.
Diffstat (limited to '032array.cc')
-rw-r--r--032array.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/032array.cc b/032array.cc
index cef79b35..c4676d96 100644
--- a/032array.cc
+++ b/032array.cc
@@ -331,8 +331,8 @@ case INDEX_ADDRESS: {
   reagent product = inst.products.at(0);
   canonize_type(product);
   reagent element;
-  element.type = new type_tree(*array_element(base.type));
-  element.type = new type_tree(get(Type_ordinal, "address"), element.type);
+  element.type = new type_tree("address", get(Type_ordinal, "address"),
+                               new type_tree(*array_element(base.type)));
   if (!types_coercible(product, element)) {
     raise_error << maybe(get(Recipe, r).name) << "'index' on " << base.original_string << " can't be saved in " << product.original_string << "; type should be " << to_string(element.type) << '\n' << end();
     break;