raw: true
eval: true
noOpt: true
-- in.cue --
{
	reg: {foo: 1, bar: {baz: 3}}
	#def: {
		a: 1

		sub: reg
	}
	val: #def
	#def2: {
		a: {b: int}
	}
	val2: #def2
}
-- out/def --
reg: {
	foo: 1
	bar: {
		baz: 3
	}
}
#def: {
	a:   1
	sub: reg
}
val: #def
#def2: {
	a: {
		b: int
	}
}
val2: #def2
-- out/compile --
--- in.cue
{
  {
    reg: {
      foo: 1
      bar: {
        baz: 3
      }
    }
    #def: {
      a: 1
      sub: 〈1;reg〉
    }
    val: 〈0;#def〉
    #def2: {
      a: {
        b: int
      }
    }
    val2: 〈0;#def2〉
  }
}
-- out/eval/stats --
Leaks:  0
Freed:  23
Reused: 18
Allocs: 5
Retain: 0

Unifications: 23
Conjuncts:    28
Disjuncts:    23
-- out/evalalpha --
(struct){
  reg: (struct){
    foo: (int){ 1 }
    bar: (struct){
      baz: (int){ 3 }
    }
  }
  #def: (#struct){
    a: (int){ 1 }
    sub: (#struct){
      foo: (int){ 1 }
      bar: (#struct){
        baz: (int){ 3 }
      }
    }
  }
  val: ~(#def)
  #def2: (#struct){
    a: (#struct){
      b: (int){ int }
    }
  }
  val2: ~(#def2)
}
-- diff/-out/evalalpha<==>+out/eval --
diff old new
--- old
+++ new
@@ -14,23 +14,11 @@
       }
     }
   }
-  val: (#struct){
-    a: (int){ 1 }
-    sub: (#struct){
-      foo: (int){ 1 }
-      bar: (#struct){
-        baz: (int){ 3 }
-      }
-    }
-  }
+  val: ~(#def)
   #def2: (#struct){
     a: (#struct){
       b: (int){ int }
     }
   }
-  val2: (#struct){
-    a: (#struct){
-      b: (int){ int }
-    }
-  }
+  val2: ~(#def2)
 }
-- out/eval --
(struct){
  reg: (struct){
    foo: (int){ 1 }
    bar: (struct){
      baz: (int){ 3 }
    }
  }
  #def: (#struct){
    a: (int){ 1 }
    sub: (#struct){
      foo: (int){ 1 }
      bar: (#struct){
        baz: (int){ 3 }
      }
    }
  }
  val: (#struct){
    a: (int){ 1 }
    sub: (#struct){
      foo: (int){ 1 }
      bar: (#struct){
        baz: (int){ 3 }
      }
    }
  }
  #def2: (#struct){
    a: (#struct){
      b: (int){ int }
    }
  }
  val2: (#struct){
    a: (#struct){
      b: (int){ int }
    }
  }
}
