# Tests that string interpolation correctly reports "incomplete" errors when
# the interpolated field is abstract (non-concrete), while still allowing the
# parent struct to be unified with a concrete value. Issue: interpolation inside
# a definition produced an "incomplete" error on the definition field itself,
# but the unified concrete result (e.g. `a: #R & {pos: 67}`) should evaluate
# to a concrete string.
# https://cuelang.org/issue/487
-- in.cue --
t1: {
	#R: {
		pos:  uint
		name: "hello_\(pos)"
	}
	a: #R & {pos: 67}
}
t2: {
	#R: {
		pos:  string
		name: "hello_\(pos)"
	}
	a: #R & {pos: "a"}
}
-- out/compile --
--- in.cue
{
  t1: {
    #R: {
      pos: &(int, >=0)
      name: "hello_\(〈0;pos〉)"
    }
    a: (〈0;#R〉 & {
      pos: 67
    })
  }
  t2: {
    #R: {
      pos: string
      name: "hello_\(〈0;pos〉)"
    }
    a: (〈0;#R〉 & {
      pos: "a"
    })
  }
}
