#name: issue318
#evalFull
-- in.cue --
#T: {
	arg: x: string
	out1: "\(arg.x) \(arg.y)"
	out2: "\(arg.y)"
	vx:   arg.x
	vy:   arg.y
}
-- out/def --
#T: {
	arg: {
		x: string
	}
	out1: _|_ // undefined field "y"
	out2: _|_ // undefined field "y"
	vx:   arg.x
	vy:   _|_ // undefined field "y"
}
-- out/export --

-- out/yaml --
{}
-- out/json --
{}
-- out/legacy-debug --
<0>{#T: <1>C{arg: <2>C{x: string}, out1: _|_(<3>.arg.y:undefined field "y"), out2: _|_(<3>.arg.y:undefined field "y"), vx: string, vy: _|_(<3>.arg.y:undefined field "y")}}
-- out/compile --
--- in.cue
{
  #T: {
    arg: {
      x: string
    }
    out1: "\(〈0;arg〉.x) \(〈0;arg〉.y)"
    out2: "\(〈0;arg〉.y)"
    vx: 〈0;arg〉.x
    vy: 〈0;arg〉.y
  }
}
-- out/eval/stats --
Leaks:  0
Freed:  8
Reused: 4
Allocs: 4
Retain: 0

Unifications: 8
Conjuncts:    9
Disjuncts:    8
-- out/eval --
Errors:
#T.out1: invalid interpolation: undefined field: y:
    ./in.cue:3:8
    ./in.cue:3:24
#T.out2: invalid interpolation: undefined field: y:
    ./in.cue:4:8
    ./in.cue:4:15
#T.vy: undefined field: y:
    ./in.cue:6:12

Result:
(_|_){
  // [eval]
  #T: (_|_){
    // [eval]
    arg: (#struct){
      x: (string){ string }
    }
    out1: (_|_){
      // [eval] #T.out1: invalid interpolation: undefined field: y:
      //     ./in.cue:3:8
      //     ./in.cue:3:24
    }
    out2: (_|_){
      // [eval] #T.out2: invalid interpolation: undefined field: y:
      //     ./in.cue:4:8
      //     ./in.cue:4:15
    }
    vx: (string){ string }
    vy: (_|_){
      // [eval] #T.vy: undefined field: y:
      //     ./in.cue:6:12
    }
  }
}
