-- in.cue --
regularFields: {
	[_]: matchIf({x!: >2}, {y!: 5}, {y!: 1})
	ok1: {x: 10, y: 5}
	ok2: {x: 11, y: 5}
	ok3: {x: 2, y: 1}
	ok4: {x: 1, y: 1}

	// TODO: allow unwrapping errors so that we can test args in wrapped errors,
	// without having to match the other arguments.
	err1: {x: 10, y: 6}
	err2: {x: 11, y: 6}
	err3: {x: 2, y: 5}
	err4: {x: 1, y: 2}
}
-- out/compile --
--- in.cue
{
  regularFields: {
    [_]: matchIf({
      x!: >2
    }, {
      y!: 5
    }, {
      y!: 1
    })
    ok1: {
      x: 10
      y: 5
    }
    ok2: {
      x: 11
      y: 5
    }
    ok3: {
      x: 2
      y: 1
    }
    ok4: {
      x: 1
      y: 1
    }
    err1: {
      x: 10
      y: 6
    }
    err2: {
      x: 11
      y: 6
    }
    err3: {
      x: 2
      y: 5
    }
    err4: {
      x: 1
      y: 2
    }
  }
}
