about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-03-18 23:20:06 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-03-18 23:38:43 -0700
commitd15c554a51c77cf1eb736363a63dbd8b5e006d49 (patch)
tree6338a0bf283dd22ca29920565b57390f615c60df
parent03880ba6ba314382fbb577da6003e590361fb8d9 (diff)
downloadmu-d15c554a51c77cf1eb736363a63dbd8b5e006d49.tar.gz
2789
Why do earlier unit tests start to fail if I load chessboard.mu fail
after correcting the definition of new-channel to be properly generic? I
have narrowed it down to a manual test but am still struggling to turn
it into a scenario.

It looks like the 'new' instruction is the culprit:
  first transform:
    load a recipe containing a call to new with a generic type
      parse_type_tree is called, and pollutes the Type_ordinal table with the generic type
  second transform:
    load a generic container containing the same generic type ingredient
    it fails to be detected as a generic type ingredient

To reproduce, compare these two commands:
  mu test
  mu test z.mu
-rw-r--r--z.mu10
1 files changed, 10 insertions, 0 deletions
diff --git a/z.mu b/z.mu
new file mode 100644
index 00000000..d99438c1
--- /dev/null
+++ b/z.mu
@@ -0,0 +1,10 @@
+def barz x:_elem [
+  local-scope
+  load-ingredients
+  y:address:shared:number <- new _elem:type
+]
+
+def fooz [
+  local-scope
+  barz 34
+]