about summary refs log tree commit diff stats
path: root/033exclusive_container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-11-06 11:17:39 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-11-06 11:53:10 -0800
commit571791babc25dce11c188ece3530817a1c80391c (patch)
treea45e614375028d73e7392e19442d9b44be321109 /033exclusive_container.cc
parent7cca315fb435234adae3c46c65594feccb9d1fbd (diff)
downloadmu-571791babc25dce11c188ece3530817a1c80391c.tar.gz
3637 - better 'missing type ingredient' errors
Programming languages need some higher-level language construct that's
neither an interface nor a class nor an object but a *collection of
mutually recursive functions with a well-defined set of entry points and
common ingredients. Perhaps the solution here is the Haskell "save your
boilerplate" paper. For now I'm going to include the purpose in
auxiliary variable names that aren't really necessary for the core
processing of a function.

Thanks Caleb Couch for reporting this issue.
Diffstat (limited to '033exclusive_container.cc')
-rw-r--r--033exclusive_container.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/033exclusive_container.cc b/033exclusive_container.cc
index 800f1a86..88b33639 100644
--- a/033exclusive_container.cc
+++ b/033exclusive_container.cc
@@ -37,11 +37,11 @@ if (t.kind == EXCLUSIVE_CONTAINER) {
 }
 :(before "End compute_container_sizes Atom Cases")
 if (info.kind == EXCLUSIVE_CONTAINER) {
-  compute_exclusive_container_sizes(info, type, pending_metadata);
+  compute_exclusive_container_sizes(info, type, pending_metadata, location_for_error_messages);
 }
 
 :(code)
-void compute_exclusive_container_sizes(const type_info& exclusive_container_info, const type_tree* full_type, set<type_tree>& pending_metadata) {
+void compute_exclusive_container_sizes(const type_info& exclusive_container_info, const type_tree* full_type, set<type_tree>& pending_metadata, const string& location_for_error_messages) {
   // size of an exclusive container is the size of its largest variant
   // (So, like containers, it can only contain arrays if they're static and
   // include their length in the type.)
@@ -49,7 +49,7 @@ void compute_exclusive_container_sizes(const type_info& exclusive_container_info
   for (int i = 0;  i < SIZE(exclusive_container_info.elements);  ++i) {
     reagent/*copy*/ element = exclusive_container_info.elements.at(i);
     // Compute Exclusive Container Size(element, full_type)
-    compute_container_sizes(element.type, pending_metadata);
+    compute_container_sizes(element.type, pending_metadata, location_for_error_messages);
     int variant_size = size_of(element);
     if (variant_size > metadata.size) metadata.size = variant_size;
   }