-- in.cue --
reduced: {
	A: b: (A.c & {}).x
	A: null | { c: x: 1 }
}

full: {
	out: #Workflow.#Step & {
		uses: "actions/upload-artifact@v3"
		with: {
			name: "foo"
			path: "bar"
		}
	}
	
	Y=#Workflow: #Step: (Y.steps & {x: {}}).x
	
	#Workflow: null | {
		steps: [string]: {
			uses?: string
			with?: [string]: string
		}
	}
}
-- out/eval/stats --
Leaks:  6
Freed:  29
Reused: 22
Allocs: 13
Retain: 10

Unifications: 31
Conjuncts:    57
Disjuncts:    38
-- out/eval --
(struct){
  reduced: (struct){
    A: (struct){
      b: (int){ 1 }
      c: (struct){
        x: (int){ 1 }
      }
    }
  }
  full: (struct){
    out: (#struct){
      uses: (string){ "actions/upload-artifact@v3" }
      with: (#struct){
        name: (string){ "foo" }
        path: (string){ "bar" }
      }
    }
    #Workflow: (#struct){
      #Step: (#struct){
        uses?: (string){ string }
        with?: (#struct){
        }
      }
      steps: (#struct){
      }
    }
  }
}
-- out/compile --
--- in.cue
{
  reduced: {
    A: {
      b: (〈1;A〉.c & {}).x
    }
    A: (null|{
      c: {
        x: 1
      }
    })
  }
  full: {
    out: (〈0;#Workflow〉.#Step & {
      uses: "actions/upload-artifact@v3"
      with: {
        name: "foo"
        path: "bar"
      }
    })
    #Workflow: {
      #Step: (〈1;#Workflow〉.steps & {
        x: {}
      }).x
    }
    #Workflow: (null|{
      steps: {
        [string]: {
          uses?: string
          with?: {
            [string]: string
          }
        }
      }
    })
  }
}
