about summary refs log tree commit diff stats
path: root/030container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-10-05 20:24:23 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-10-05 20:24:23 -0700
commit255c2293e52d5c273b77aec1a0470a24304a1c2c (patch)
tree19a4f53c6dae3f0a84308041209a4aa8446059b4 /030container.cc
parent50b48db0cc16057b9151888c3d4e1442dfbabeef (diff)
downloadmu-255c2293e52d5c273b77aec1a0470a24304a1c2c.tar.gz
2251
Unbelievable that this hitherto-unanticipated test passed so easily.
Even though I'm simply bolting on special cases in an ad hoc manner,
this isn't too shabby.
Diffstat (limited to '030container.cc')
-rw-r--r--030container.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/030container.cc b/030container.cc
index 0e39e757..0cecdec7 100644
--- a/030container.cc
+++ b/030container.cc
@@ -618,7 +618,7 @@ recipe main [
 
 :(before "End Globals")
 // We'll use large type ordinals to mean "the following type of the variable".
-const int FINAL_TYPE_ORDINAL = 900;
+const int FINAL_TYPE_ORDINAL = 2000;
 :(before "End Test Run Initialization")
 assert(Next_type_ordinal < FINAL_TYPE_ORDINAL);
 
@@ -705,3 +705,19 @@ if (Type[base_type].elements.at(i).at(0) >= FINAL_TYPE_ORDINAL) {
   result += size_of_ingredient(Type[base_type], i, base.types);
   continue;
 }
+
+:(scenario get_on_generic_container_inside_generic_container)
+container foo [
+  t <- next-type
+  x:t
+  y:number
+]
+container bar [
+  x:foo:point
+  y:number
+]
+recipe main [
+  1:bar <- merge 14, 15, 16, 17
+  2:number <- get 1:bar, 1:offset
+]
++mem: storing 17 in location 2