cuelang.org/go@v0.10.1/internal/core/export/testdata/main/let.txtar (about)

     1  # Issue #590
     2  
     3  -- in.cue --
     4  let X = 1 + 1
     5  #Foo: X
     6  -- x.cue --
     7  x: string
     8  
     9  let Y = x
    10  y: Y
    11  -- y.cue --
    12  x: "foo"
    13  
    14  // Note: although syntactically the same, this is a different let clause than
    15  // the one from before and thus will be renamed.
    16  // Issue #590
    17  let Y = x
    18  y: Y
    19  -- issue593.cue --
    20  cfgs: [for crd in ["one", "two"] {
    21  	metadata: {
    22  		name: crd
    23  	}
    24  }]
    25  for cfg in cfgs {
    26  	let filepath = "kind-\(cfg.name)"
    27  	files: {
    28  		"\(filepath)": {
    29  			patches: cfg
    30  		}
    31  	}
    32  }
    33  -- for.cue --
    34  comprehension: {
    35  	for cfg in [{a: "one"}] {
    36  		let filepath = "kind-\(cfg.name)"
    37  		"\(filepath)": {
    38  			patches: cfg
    39  		}
    40  	}
    41  }
    42  -- scope.cue --
    43  scoped: {
    44  	_args: required: 1
    45  	direct: {
    46  		let Args = _args
    47  		a: Args.required
    48  	}
    49  	embed1: {
    50  		let Args = _args
    51  		a: {Args.required}
    52  	}
    53  	embed2: {
    54  		let Args = _args
    55  		a: {{Args.required}}
    56  	}
    57  	list: {
    58  		let Args = _args
    59  		a: [Args.required]
    60  	}
    61  	listStruct: {
    62  		let Args = _args
    63  		a: [{a: Args.required}]
    64  	}
    65  	listEmbed: {
    66  		let Args = _args
    67  		a: [{Args.required}]
    68  	}
    69  }
    70  -- incomplete.cue --
    71  complete: {
    72  	let A = run.a
    73  	x: "a \(A) z"
    74  	run: {
    75  		a: "foo"
    76  	}
    77  }
    78  incomplete: a: {
    79  	x: "a \(run.a) z"
    80  	run: {
    81  		a: string
    82  	}
    83  }
    84  incomplete: b: {
    85  	let A = run.a
    86  	x: "a \(A) z"
    87  	run: {
    88  		a: string
    89  	}
    90  }
    91  incomplete: c: {
    92  	{
    93  		let A = run.a
    94  		x: "a \(A) z"
    95  		run: a: string
    96  	}
    97  	{
    98  		let A = run2.a
    99  		x2: "a \(A) z"
   100  		run2: a: string
   101  	}
   102  }
   103  incomplete: d: {
   104  	let A = run.a
   105  	x: "a \(A) z"
   106  	run: a: string
   107  } & {
   108  	let A = run2.a
   109  	x2: "a \(A) z"
   110  	run2: a: string
   111  }
   112  
   113  unresolvedDisjunction: {
   114  	#TypePrimitive: {
   115  		_args: {
   116  			required: bool
   117  		}
   118  		let Args = _args
   119  
   120  		{"*": {}} |
   121  		{"bool": #TypeBool & {_args: required: Args.required}}
   122  	}
   123  
   124  	#TypeBool: {
   125  		_args: required: bool
   126  		let Args = _args
   127  
   128  		if !Args.required {
   129  			// `default` sets the default value.
   130  			default: bool | null
   131  		}
   132  	}
   133  }
   134  -- out/definition --
   135  
   136  let X = 1 + 1
   137  let Y = x
   138  let Y_1 = x
   139  {
   140  	cfgs: [for crd in ["one", "two"] {
   141  		metadata: {
   142  			name: crd
   143  		}
   144  	}]
   145  	for cfg in cfgs {
   146  		let filepath = "kind-\(cfg.name)"
   147  		files: {
   148  			"\(filepath)": {
   149  				patches: cfg
   150  			}
   151  		}
   152  	}
   153  }
   154  comprehension: {
   155  	for cfg in [{
   156  		a: "one"
   157  	}] {
   158  		let filepath_1 = "kind-\(cfg.name)"
   159  		"\(filepath_1)": {
   160  			patches: cfg
   161  		}
   162  	}
   163  }
   164  #Foo: X
   165  complete: {
   166  	let A = run.a
   167  	x: "a \(A) z"
   168  	run: {
   169  		a: "foo"
   170  	}
   171  }
   172  scoped: {
   173  	_args: {
   174  		required: 1
   175  	}
   176  	direct: {
   177  		let Args = _args
   178  		a: Args.required
   179  	}
   180  	embed1: {
   181  		let Args_1 = _args
   182  		a: Args_1.required
   183  	}
   184  	embed2: {
   185  		let Args_2 = _args
   186  		a: Args_2.required
   187  	}
   188  	list: {
   189  		let Args_3 = _args
   190  		a: [Args_3.required]
   191  	}
   192  	listStruct: {
   193  		let Args_4 = _args
   194  		a: [{
   195  			a: Args_4.required
   196  		}]
   197  	}
   198  	listEmbed: {
   199  		let Args_8 = _args
   200  		a: [Args_8.required]
   201  	}
   202  }
   203  x: "foo"
   204  incomplete: {
   205  	a: {
   206  		x: "a \(run.a) z"
   207  		run: {
   208  			a: string
   209  		}
   210  	}
   211  	b: {
   212  		let A_1 = run.a
   213  		x: "a \(A_1) z"
   214  		run: {
   215  			a: string
   216  		}
   217  	}
   218  	c: {
   219  		let A_2 = run.a
   220  		let A_3 = run2.a
   221  		x:  "a \(A_2) z"
   222  		x2: "a \(A_3) z"
   223  		run: {
   224  			a: string
   225  		}
   226  		run2: {
   227  			a: string
   228  		}
   229  	}
   230  	d: {
   231  		let A_4 = run.a
   232  		let A_32 = run2.a
   233  		x:  "a \(A_4) z"
   234  		x2: "a \(A_32) z"
   235  		run: {
   236  			a: string
   237  		}
   238  		run2: {
   239  			a: string
   240  		}
   241  	}
   242  }
   243  unresolvedDisjunction: {
   244  	#TypePrimitive: {
   245  		let Args_9 = _args
   246  		{
   247  			"*": {}
   248  		} | {
   249  			bool: #TypeBool & {
   250  				_args: {
   251  					required: Args_9.required
   252  				}
   253  			}
   254  		}
   255  		_args: {
   256  			required: bool
   257  		}
   258  	}
   259  	#TypeBool: {
   260  		let Args_B = _args
   261  		_args: {
   262  			required: bool
   263  		}
   264  
   265  		if !Args_B.required {
   266  			// `default` sets the default value.
   267  			default: bool | null
   268  		}
   269  	}
   270  }
   271  y: Y & Y_1
   272  -- out/doc --
   273  []
   274  [comprehension]
   275  [comprehension filepath]
   276  [X]
   277  [#Foo]
   278  [complete]
   279  [complete A]
   280  [complete x]
   281  [complete run]
   282  [complete run a]
   283  [incomplete]
   284  [incomplete a]
   285  [incomplete a x]
   286  [incomplete a run]
   287  [incomplete a run a]
   288  [incomplete b]
   289  [incomplete b A]
   290  [incomplete b x]
   291  [incomplete b run]
   292  [incomplete b run a]
   293  [incomplete c]
   294  [incomplete c A]
   295  [incomplete c x]
   296  [incomplete c run]
   297  [incomplete c run a]
   298  [incomplete c A]
   299  [incomplete c x2]
   300  [incomplete c run2]
   301  [incomplete c run2 a]
   302  [incomplete d]
   303  [incomplete d A]
   304  [incomplete d x]
   305  [incomplete d run]
   306  [incomplete d run a]
   307  [incomplete d A]
   308  [incomplete d x2]
   309  [incomplete d run2]
   310  [incomplete d run2 a]
   311  [unresolvedDisjunction]
   312  [unresolvedDisjunction #TypePrimitive]
   313  [unresolvedDisjunction #TypePrimitive _args]
   314  [unresolvedDisjunction #TypePrimitive _args required]
   315  [unresolvedDisjunction #TypePrimitive Args]
   316  [unresolvedDisjunction #TypePrimitive Args required]
   317  [unresolvedDisjunction #TypePrimitive "*"]
   318  [unresolvedDisjunction #TypeBool]
   319  [unresolvedDisjunction #TypeBool _args]
   320  [unresolvedDisjunction #TypeBool _args required]
   321  [unresolvedDisjunction #TypeBool Args]
   322  [unresolvedDisjunction #TypeBool Args required]
   323  [cfgs]
   324  [cfgs 0]
   325  [cfgs 0 metadata]
   326  [cfgs 0 metadata name]
   327  [cfgs 1]
   328  [cfgs 1 metadata]
   329  [cfgs 1 metadata name]
   330  [filepath]
   331  [files]
   332  [scoped]
   333  [scoped _args]
   334  [scoped _args required]
   335  [scoped direct]
   336  [scoped direct Args]
   337  [scoped direct Args required]
   338  [scoped direct a]
   339  [scoped embed1]
   340  [scoped embed1 Args]
   341  [scoped embed1 Args required]
   342  [scoped embed1 a]
   343  [scoped embed2]
   344  [scoped embed2 Args]
   345  [scoped embed2 Args required]
   346  [scoped embed2 a]
   347  [scoped list]
   348  [scoped list Args]
   349  [scoped list Args required]
   350  [scoped list a]
   351  [scoped list a 0]
   352  [scoped listStruct]
   353  [scoped listStruct Args]
   354  [scoped listStruct Args required]
   355  [scoped listStruct a]
   356  [scoped listStruct a 0]
   357  [scoped listStruct a 0 a]
   358  [scoped listEmbed]
   359  [scoped listEmbed Args]
   360  [scoped listEmbed Args required]
   361  [scoped listEmbed a]
   362  [scoped listEmbed a 0]
   363  [x]
   364  [Y]
   365  [y]
   366  [Y]
   367  -- out/value-v3 --
   368  == Simplified
   369  {
   370  	comprehension: {
   371  		for cfg in [{
   372  			a: "one"
   373  		}] {
   374  			let filepath = "kind-\(cfg.name)"
   375  			"\(filepath)": {
   376  				patches: cfg
   377  			}
   378  		}
   379  	}
   380  	complete: {
   381  		x: "a foo z"
   382  		run: {
   383  			a: "foo"
   384  		}
   385  	}
   386  	cfgs: [{
   387  		metadata: {
   388  			name: "one"
   389  		}
   390  	}, {
   391  		metadata: {
   392  			name: "two"
   393  		}
   394  	}]
   395  	files: {
   396  		"\("kind-\(cfg.name)")": {
   397  			patches: cfg
   398  		}
   399  	}
   400  	scoped: {
   401  		direct: {
   402  			a: 1
   403  		}
   404  		embed1: {
   405  			a: 1
   406  		}
   407  		embed2: {
   408  			a: 1
   409  		}
   410  		list: {
   411  			a: [1]
   412  		}
   413  		listStruct: {
   414  			a: [{
   415  				a: 1
   416  			}]
   417  		}
   418  		listEmbed: {
   419  			a: [1]
   420  		}
   421  	}
   422  	x: "foo"
   423  	incomplete: {
   424  		a: {
   425  			x: "a \(run.a) z"
   426  			run: {
   427  				a: string
   428  			}
   429  		}
   430  		b: {
   431  			let A = run.a
   432  			x: "a \(A) z"
   433  			run: {
   434  				a: string
   435  			}
   436  		}
   437  		c: {
   438  			let A_1 = run.a
   439  			let A_2 = run2.a
   440  			x:  "a \(A_1) z"
   441  			x2: "a \(A_2) z"
   442  			run: {
   443  				a: string
   444  			}
   445  			run2: {
   446  				a: string
   447  			}
   448  		}
   449  		d: {
   450  			let A_3 = run.a
   451  			let A_4 = run2.a
   452  			x:  "a \(A_3) z"
   453  			x2: "a \(A_4) z"
   454  			run: {
   455  				a: string
   456  			}
   457  			run2: {
   458  				a: string
   459  			}
   460  		}
   461  	}
   462  	unresolvedDisjunction: {}
   463  	y: "foo"
   464  }
   465  == Raw
   466  {
   467  	comprehension: {
   468  		for cfg in [{
   469  			a: "one"
   470  		}] {
   471  			let filepath = "kind-\(cfg.name)"
   472  			"\(filepath)": {
   473  				patches: cfg
   474  			}
   475  		}
   476  	}
   477  	#Foo: 2
   478  	complete: {
   479  		x: "a foo z"
   480  		run: {
   481  			a: "foo"
   482  		}
   483  	}
   484  	cfgs: [{
   485  		metadata: {
   486  			name: "one"
   487  		}
   488  	}, {
   489  		metadata: {
   490  			name: "two"
   491  		}
   492  	}]
   493  	files: {
   494  		"\("kind-\(cfg.name)")": {
   495  			patches: cfg
   496  		}
   497  	}
   498  	scoped: {
   499  		_args: {
   500  			required: 1
   501  		}
   502  		direct: {
   503  			a: 1
   504  		}
   505  		embed1: {
   506  			a: 1
   507  		}
   508  		embed2: {
   509  			a: 1
   510  		}
   511  		list: {
   512  			a: [1]
   513  		}
   514  		listStruct: {
   515  			a: [{
   516  				a: 1
   517  			}]
   518  		}
   519  		listEmbed: {
   520  			a: [1]
   521  		}
   522  	}
   523  	x: "foo"
   524  	incomplete: {
   525  		a: {
   526  			x: "a \(run.a) z"
   527  			run: {
   528  				a: string
   529  			}
   530  		}
   531  		b: {
   532  			let A = run.a
   533  			x: "a \(A) z"
   534  			run: {
   535  				a: string
   536  			}
   537  		}
   538  		c: {
   539  			let A_1 = run.a
   540  			let A_2 = run2.a
   541  			x:  "a \(A_1) z"
   542  			x2: "a \(A_2) z"
   543  			run: {
   544  				a: string
   545  			}
   546  			run2: {
   547  				a: string
   548  			}
   549  		}
   550  		d: {
   551  			let A_3 = run.a
   552  			let A_4 = run2.a
   553  			x:  "a \(A_3) z"
   554  			x2: "a \(A_4) z"
   555  			run: {
   556  				a: string
   557  			}
   558  			run2: {
   559  				a: string
   560  			}
   561  		}
   562  	}
   563  	unresolvedDisjunction: {
   564  		#TypePrimitive: {
   565  			_args: {
   566  				required: bool
   567  			}
   568  			"*": {}
   569  		}
   570  		#TypeBool: {
   571  			let Args = _args
   572  			_args: {
   573  				required: bool
   574  			}
   575  
   576  			if !Args.required {
   577  				// `default` sets the default value.
   578  				default: bool | null
   579  			}
   580  		}
   581  	}
   582  	y: "foo"
   583  }
   584  == Final
   585  {
   586  	comprehension: _|_ // comprehension: key value of dynamic field must be concrete, found _|_(invalid interpolation: invalid interpolation: comprehension.filepath: undefined field: name) (and 1 more errors)
   587  	complete: {
   588  		x: "a foo z"
   589  		run: {
   590  			a: "foo"
   591  		}
   592  	}
   593  	cfgs: [{
   594  		metadata: {
   595  			name: "one"
   596  		}
   597  	}, {
   598  		metadata: {
   599  			name: "two"
   600  		}
   601  	}]
   602  	files: _|_ // files: key value of dynamic field must be concrete, found _|_(invalid interpolation: invalid interpolation: filepath: undefined field: name) (and 3 more errors)
   603  	scoped: {
   604  		direct: {
   605  			a: 1
   606  		}
   607  		embed1: {
   608  			a: 1
   609  		}
   610  		embed2: {
   611  			a: 1
   612  		}
   613  		list: {
   614  			a: [1]
   615  		}
   616  		listStruct: {
   617  			a: [{
   618  				a: 1
   619  			}]
   620  		}
   621  		listEmbed: {
   622  			a: [1]
   623  		}
   624  	}
   625  	x: "foo"
   626  	incomplete: {
   627  		a: {
   628  			x: _|_ // invalid interpolation: incomplete.a.x: non-concrete value string (type string)
   629  			run: {
   630  				a: string
   631  			}
   632  		}
   633  		b: {
   634  			x: _|_ // invalid interpolation: incomplete.b.x: non-concrete value string (type string)
   635  			run: {
   636  				a: string
   637  			}
   638  		}
   639  		c: {
   640  			x:  _|_ // invalid interpolation: incomplete.c.x: non-concrete value string (type string)
   641  			x2: _|_ // invalid interpolation: incomplete.c.x2: non-concrete value string (type string)
   642  			run: {
   643  				a: string
   644  			}
   645  			run2: {
   646  				a: string
   647  			}
   648  		}
   649  		d: {
   650  			x:  _|_ // invalid interpolation: incomplete.d.x: non-concrete value string (type string)
   651  			x2: _|_ // invalid interpolation: incomplete.d.x2: non-concrete value string (type string)
   652  			run: {
   653  				a: string
   654  			}
   655  			run2: {
   656  				a: string
   657  			}
   658  		}
   659  	}
   660  	unresolvedDisjunction: {}
   661  	y: "foo"
   662  }
   663  == All
   664  {
   665  	comprehension: {
   666  		for cfg in [{
   667  			a: "one"
   668  		}] {
   669  			let filepath = "kind-\(cfg.name)"
   670  			"\(filepath)": {
   671  				patches: cfg
   672  			}
   673  		}
   674  	}
   675  	#Foo: 2
   676  	complete: {
   677  		x: "a foo z"
   678  		run: {
   679  			a: "foo"
   680  		}
   681  	}
   682  	cfgs: [{
   683  		metadata: {
   684  			name: "one"
   685  		}
   686  	}, {
   687  		metadata: {
   688  			name: "two"
   689  		}
   690  	}]
   691  	files: {
   692  		"\("kind-\(cfg.name)")": {
   693  			patches: cfg
   694  		}
   695  	}
   696  	scoped: {
   697  		_args: {
   698  			required: 1
   699  		}
   700  		direct: {
   701  			a: 1
   702  		}
   703  		embed1: {
   704  			a: 1
   705  		}
   706  		embed2: {
   707  			a: 1
   708  		}
   709  		list: {
   710  			a: [1]
   711  		}
   712  		listStruct: {
   713  			a: [{
   714  				a: 1
   715  			}]
   716  		}
   717  		listEmbed: {
   718  			a: [1]
   719  		}
   720  	}
   721  	x: "foo"
   722  	incomplete: {
   723  		a: {
   724  			x: "a \(run.a) z"
   725  			run: {
   726  				a: string
   727  			}
   728  		}
   729  		b: {
   730  			let A = run.a
   731  			x: "a \(A) z"
   732  			run: {
   733  				a: string
   734  			}
   735  		}
   736  		c: {
   737  			let A_1 = run.a
   738  			let A_2 = run2.a
   739  			x:  "a \(A_1) z"
   740  			x2: "a \(A_2) z"
   741  			run: {
   742  				a: string
   743  			}
   744  			run2: {
   745  				a: string
   746  			}
   747  		}
   748  		d: {
   749  			let A_3 = run.a
   750  			let A_4 = run2.a
   751  			x:  "a \(A_3) z"
   752  			x2: "a \(A_4) z"
   753  			run: {
   754  				a: string
   755  			}
   756  			run2: {
   757  				a: string
   758  			}
   759  		}
   760  	}
   761  	unresolvedDisjunction: {
   762  		#TypePrimitive: {
   763  			_args: {
   764  				required: bool
   765  			}
   766  			"*": {}
   767  		}
   768  		#TypeBool: {
   769  			let Args = _args
   770  			_args: {
   771  				required: bool
   772  			}
   773  
   774  			if !Args.required {
   775  				// `default` sets the default value.
   776  				default: bool | null
   777  			}
   778  		}
   779  	}
   780  	y: "foo"
   781  }
   782  == Eval
   783  {
   784  	comprehension: {
   785  		for cfg in [{
   786  			a: "one"
   787  		}] {
   788  			let filepath = "kind-\(cfg.name)"
   789  			"\(filepath)": {
   790  				patches: cfg
   791  			}
   792  		}
   793  	}
   794  	#Foo: 2
   795  	complete: {
   796  		x: "a foo z"
   797  		run: {
   798  			a: "foo"
   799  		}
   800  	}
   801  	cfgs: [{
   802  		metadata: {
   803  			name: "one"
   804  		}
   805  	}, {
   806  		metadata: {
   807  			name: "two"
   808  		}
   809  	}]
   810  	files: {
   811  		"\("kind-\(cfg.name)")": {
   812  			patches: cfg
   813  		}
   814  	}
   815  	scoped: {
   816  		direct: {
   817  			a: 1
   818  		}
   819  		embed1: {
   820  			a: 1
   821  		}
   822  		embed2: {
   823  			a: 1
   824  		}
   825  		list: {
   826  			a: [1]
   827  		}
   828  		listStruct: {
   829  			a: [{
   830  				a: 1
   831  			}]
   832  		}
   833  		listEmbed: {
   834  			a: [1]
   835  		}
   836  	}
   837  	x: "foo"
   838  	incomplete: {
   839  		a: {
   840  			x: "a \(run.a) z"
   841  			run: {
   842  				a: string
   843  			}
   844  		}
   845  		b: {
   846  			let A = run.a
   847  			x: "a \(A) z"
   848  			run: {
   849  				a: string
   850  			}
   851  		}
   852  		c: {
   853  			let A_1 = run.a
   854  			let A_2 = run2.a
   855  			x:  "a \(A_1) z"
   856  			x2: "a \(A_2) z"
   857  			run: {
   858  				a: string
   859  			}
   860  			run2: {
   861  				a: string
   862  			}
   863  		}
   864  		d: {
   865  			let A_3 = run.a
   866  			let A_4 = run2.a
   867  			x:  "a \(A_3) z"
   868  			x2: "a \(A_4) z"
   869  			run: {
   870  				a: string
   871  			}
   872  			run2: {
   873  				a: string
   874  			}
   875  		}
   876  	}
   877  	unresolvedDisjunction: {
   878  		#TypePrimitive: {
   879  			"*": {}
   880  		}
   881  		#TypeBool: {
   882  			let Args = _args
   883  			_args: {
   884  				required: bool
   885  			}
   886  
   887  			if !Args.required {
   888  				default: bool | null
   889  			}
   890  		}
   891  	}
   892  	y: "foo"
   893  }
   894  -- diff/-out/value-v3<==>+out/value --
   895  diff old new
   896  --- old
   897  +++ new
   898  @@ -216,23 +216,23 @@
   899   }
   900   == Final
   901   {
   902  -	comprehension: _|_ // invalid interpolation: cycle error
   903  -	complete: {
   904  -		x: "a foo z"
   905  -		run: {
   906  -			a: "foo"
   907  -		}
   908  -	}
   909  -	cfgs: [{
   910  -		metadata: {
   911  -			name: "one"
   912  -		}
   913  -	}, {
   914  -		metadata: {
   915  -			name: "two"
   916  -		}
   917  -	}]
   918  -	files: _|_ // invalid interpolation: cycle error (and 3 more errors)
   919  -	scoped: {
   920  -		direct: {
   921  -			a: 1
   922  -		}
   923  -		embed1: {
   924  -			a: 1
   925  -		}
   926  -		embed2: {
   927  -			a: 1
   928  -		}
   929  -		list: {
   930  -			a: [1]
   931  -		}
   932  -		listStruct: {
   933  -			a: [{
   934  -				a: 1
   935  -			}]
   936  -		}
   937  -		listEmbed: {
   938  -			a: [1]
   939  -		}
   940  -	}
   941  -	x: "foo"
   942  -	incomplete: {
   943  -		a: {
   944  -			x: _|_ // invalid interpolation: incomplete.a.x: non-concrete value string (type string)
   945  -			run: {
   946  -				a: string
   947  -			}
   948  -		}
   949  -		b: {
   950  -			x: _|_ // invalid interpolation: incomplete.b.x: non-concrete value string (type string)
   951  -			run: {
   952  -				a: string
   953  -			}
   954  -		}
   955  -		c: {
   956  -			x:  _|_ // invalid interpolation: incomplete.c.x: non-concrete value string (type string)
   957  -			x2: _|_ // invalid interpolation: incomplete.c.x2: non-concrete value string (type string)
   958  -			run: {
   959  -				a: string
   960  -			}
   961  -			run2: {
   962  -				a: string
   963  -			}
   964  -		}
   965  -		d: {
   966  -			x:  _|_ // invalid interpolation: incomplete.d.x: non-concrete value string (type string)
   967  -			x2: _|_ // invalid interpolation: incomplete.d.x2: non-concrete value string (type string)
   968  +	comprehension: _|_ // comprehension: key value of dynamic field must be concrete, found _|_(invalid interpolation: invalid interpolation: comprehension.filepath: undefined field: name (and 1 more errors)) (and 2 more errors)
   969  +	complete: {
   970  +		x: "a foo z"
   971  +		run: {
   972  +			a: "foo"
   973  +		}
   974  +	}
   975  +	cfgs: [{
   976  +		metadata: {
   977  +			name: "one"
   978  +		}
   979  +	}, {
   980  +		metadata: {
   981  +			name: "two"
   982  +		}
   983  +	}]
   984  +	files: _|_ // files: key value of dynamic field must be concrete, found _|_(invalid interpolation: invalid interpolation: filepath: undefined field: name (and 1 more errors)) (and 5 more errors)
   985  +	scoped: {
   986  +		direct: {
   987  +			a: 1
   988  +		}
   989  +		embed1: {
   990  +			a: 1
   991  +		}
   992  +		embed2: {
   993  +			a: 1
   994  +		}
   995  +		list: {
   996  +			a: [1]
   997  +		}
   998  +		listStruct: {
   999  +			a: [{
  1000  +				a: 1
  1001  +			}]
  1002  +		}
  1003  +		listEmbed: {
  1004  +			a: [1]
  1005  +		}
  1006  +	}
  1007  +	x: "foo"
  1008  +	incomplete: {
  1009  +		a: {
  1010  +			x: _|_ // invalid interpolation: incomplete.a.x: non-concrete value string (type string) (and 1 more errors)
  1011  +			run: {
  1012  +				a: string
  1013  +			}
  1014  +		}
  1015  +		b: {
  1016  +			x: _|_ // invalid interpolation: incomplete.b.x: non-concrete value string (type string) (and 1 more errors)
  1017  +			run: {
  1018  +				a: string
  1019  +			}
  1020  +		}
  1021  +		c: {
  1022  +			x:  _|_ // invalid interpolation: incomplete.c.x: non-concrete value string (type string) (and 1 more errors)
  1023  +			x2: _|_ // invalid interpolation: incomplete.c.x2: non-concrete value string (type string) (and 1 more errors)
  1024  +			run: {
  1025  +				a: string
  1026  +			}
  1027  +			run2: {
  1028  +				a: string
  1029  +			}
  1030  +		}
  1031  +		d: {
  1032  +			x:  _|_ // invalid interpolation: incomplete.d.x: non-concrete value string (type string) (and 1 more errors)
  1033  +			x2: _|_ // invalid interpolation: incomplete.d.x2: non-concrete value string (type string) (and 1 more errors)
  1034   			run: {
  1035   				a: string
  1036   			}
  1037  -- diff/value/explanation --
  1038  Improved error messages.
  1039  -- out/value --
  1040  == Simplified
  1041  {
  1042  	comprehension: {
  1043  		for cfg in [{
  1044  			a: "one"
  1045  		}] {
  1046  			let filepath = "kind-\(cfg.name)"
  1047  			"\(filepath)": {
  1048  				patches: cfg
  1049  			}
  1050  		}
  1051  	}
  1052  	complete: {
  1053  		x: "a foo z"
  1054  		run: {
  1055  			a: "foo"
  1056  		}
  1057  	}
  1058  	cfgs: [{
  1059  		metadata: {
  1060  			name: "one"
  1061  		}
  1062  	}, {
  1063  		metadata: {
  1064  			name: "two"
  1065  		}
  1066  	}]
  1067  	files: {
  1068  		"\("kind-\(cfg.name)")": {
  1069  			patches: cfg
  1070  		}
  1071  	}
  1072  	scoped: {
  1073  		direct: {
  1074  			a: 1
  1075  		}
  1076  		embed1: {
  1077  			a: 1
  1078  		}
  1079  		embed2: {
  1080  			a: 1
  1081  		}
  1082  		list: {
  1083  			a: [1]
  1084  		}
  1085  		listStruct: {
  1086  			a: [{
  1087  				a: 1
  1088  			}]
  1089  		}
  1090  		listEmbed: {
  1091  			a: [1]
  1092  		}
  1093  	}
  1094  	x: "foo"
  1095  	incomplete: {
  1096  		a: {
  1097  			x: "a \(run.a) z"
  1098  			run: {
  1099  				a: string
  1100  			}
  1101  		}
  1102  		b: {
  1103  			let A = run.a
  1104  			x: "a \(A) z"
  1105  			run: {
  1106  				a: string
  1107  			}
  1108  		}
  1109  		c: {
  1110  			let A_1 = run.a
  1111  			let A_2 = run2.a
  1112  			x:  "a \(A_1) z"
  1113  			x2: "a \(A_2) z"
  1114  			run: {
  1115  				a: string
  1116  			}
  1117  			run2: {
  1118  				a: string
  1119  			}
  1120  		}
  1121  		d: {
  1122  			let A_3 = run.a
  1123  			let A_4 = run2.a
  1124  			x:  "a \(A_3) z"
  1125  			x2: "a \(A_4) z"
  1126  			run: {
  1127  				a: string
  1128  			}
  1129  			run2: {
  1130  				a: string
  1131  			}
  1132  		}
  1133  	}
  1134  	unresolvedDisjunction: {}
  1135  	y: "foo"
  1136  }
  1137  == Raw
  1138  {
  1139  	comprehension: {
  1140  		for cfg in [{
  1141  			a: "one"
  1142  		}] {
  1143  			let filepath = "kind-\(cfg.name)"
  1144  			"\(filepath)": {
  1145  				patches: cfg
  1146  			}
  1147  		}
  1148  	}
  1149  	#Foo: 2
  1150  	complete: {
  1151  		x: "a foo z"
  1152  		run: {
  1153  			a: "foo"
  1154  		}
  1155  	}
  1156  	cfgs: [{
  1157  		metadata: {
  1158  			name: "one"
  1159  		}
  1160  	}, {
  1161  		metadata: {
  1162  			name: "two"
  1163  		}
  1164  	}]
  1165  	files: {
  1166  		"\("kind-\(cfg.name)")": {
  1167  			patches: cfg
  1168  		}
  1169  	}
  1170  	scoped: {
  1171  		_args: {
  1172  			required: 1
  1173  		}
  1174  		direct: {
  1175  			a: 1
  1176  		}
  1177  		embed1: {
  1178  			a: 1
  1179  		}
  1180  		embed2: {
  1181  			a: 1
  1182  		}
  1183  		list: {
  1184  			a: [1]
  1185  		}
  1186  		listStruct: {
  1187  			a: [{
  1188  				a: 1
  1189  			}]
  1190  		}
  1191  		listEmbed: {
  1192  			a: [1]
  1193  		}
  1194  	}
  1195  	x: "foo"
  1196  	incomplete: {
  1197  		a: {
  1198  			x: "a \(run.a) z"
  1199  			run: {
  1200  				a: string
  1201  			}
  1202  		}
  1203  		b: {
  1204  			let A = run.a
  1205  			x: "a \(A) z"
  1206  			run: {
  1207  				a: string
  1208  			}
  1209  		}
  1210  		c: {
  1211  			let A_1 = run.a
  1212  			let A_2 = run2.a
  1213  			x:  "a \(A_1) z"
  1214  			x2: "a \(A_2) z"
  1215  			run: {
  1216  				a: string
  1217  			}
  1218  			run2: {
  1219  				a: string
  1220  			}
  1221  		}
  1222  		d: {
  1223  			let A_3 = run.a
  1224  			let A_4 = run2.a
  1225  			x:  "a \(A_3) z"
  1226  			x2: "a \(A_4) z"
  1227  			run: {
  1228  				a: string
  1229  			}
  1230  			run2: {
  1231  				a: string
  1232  			}
  1233  		}
  1234  	}
  1235  	unresolvedDisjunction: {
  1236  		#TypePrimitive: {
  1237  			_args: {
  1238  				required: bool
  1239  			}
  1240  			"*": {}
  1241  		}
  1242  		#TypeBool: {
  1243  			let Args = _args
  1244  			_args: {
  1245  				required: bool
  1246  			}
  1247  
  1248  			if !Args.required {
  1249  				// `default` sets the default value.
  1250  				default: bool | null
  1251  			}
  1252  		}
  1253  	}
  1254  	y: "foo"
  1255  }
  1256  == Final
  1257  {
  1258  	comprehension: _|_ // invalid interpolation: cycle error
  1259  	complete: {
  1260  		x: "a foo z"
  1261  		run: {
  1262  			a: "foo"
  1263  		}
  1264  	}
  1265  	cfgs: [{
  1266  		metadata: {
  1267  			name: "one"
  1268  		}
  1269  	}, {
  1270  		metadata: {
  1271  			name: "two"
  1272  		}
  1273  	}]
  1274  	files: _|_ // invalid interpolation: cycle error (and 3 more errors)
  1275  	scoped: {
  1276  		direct: {
  1277  			a: 1
  1278  		}
  1279  		embed1: {
  1280  			a: 1
  1281  		}
  1282  		embed2: {
  1283  			a: 1
  1284  		}
  1285  		list: {
  1286  			a: [1]
  1287  		}
  1288  		listStruct: {
  1289  			a: [{
  1290  				a: 1
  1291  			}]
  1292  		}
  1293  		listEmbed: {
  1294  			a: [1]
  1295  		}
  1296  	}
  1297  	x: "foo"
  1298  	incomplete: {
  1299  		a: {
  1300  			x: _|_ // invalid interpolation: incomplete.a.x: non-concrete value string (type string)
  1301  			run: {
  1302  				a: string
  1303  			}
  1304  		}
  1305  		b: {
  1306  			x: _|_ // invalid interpolation: incomplete.b.x: non-concrete value string (type string)
  1307  			run: {
  1308  				a: string
  1309  			}
  1310  		}
  1311  		c: {
  1312  			x:  _|_ // invalid interpolation: incomplete.c.x: non-concrete value string (type string)
  1313  			x2: _|_ // invalid interpolation: incomplete.c.x2: non-concrete value string (type string)
  1314  			run: {
  1315  				a: string
  1316  			}
  1317  			run2: {
  1318  				a: string
  1319  			}
  1320  		}
  1321  		d: {
  1322  			x:  _|_ // invalid interpolation: incomplete.d.x: non-concrete value string (type string)
  1323  			x2: _|_ // invalid interpolation: incomplete.d.x2: non-concrete value string (type string)
  1324  			run: {
  1325  				a: string
  1326  			}
  1327  			run2: {
  1328  				a: string
  1329  			}
  1330  		}
  1331  	}
  1332  	unresolvedDisjunction: {}
  1333  	y: "foo"
  1334  }
  1335  == All
  1336  {
  1337  	comprehension: {
  1338  		for cfg in [{
  1339  			a: "one"
  1340  		}] {
  1341  			let filepath = "kind-\(cfg.name)"
  1342  			"\(filepath)": {
  1343  				patches: cfg
  1344  			}
  1345  		}
  1346  	}
  1347  	#Foo: 2
  1348  	complete: {
  1349  		x: "a foo z"
  1350  		run: {
  1351  			a: "foo"
  1352  		}
  1353  	}
  1354  	cfgs: [{
  1355  		metadata: {
  1356  			name: "one"
  1357  		}
  1358  	}, {
  1359  		metadata: {
  1360  			name: "two"
  1361  		}
  1362  	}]
  1363  	files: {
  1364  		"\("kind-\(cfg.name)")": {
  1365  			patches: cfg
  1366  		}
  1367  	}
  1368  	scoped: {
  1369  		_args: {
  1370  			required: 1
  1371  		}
  1372  		direct: {
  1373  			a: 1
  1374  		}
  1375  		embed1: {
  1376  			a: 1
  1377  		}
  1378  		embed2: {
  1379  			a: 1
  1380  		}
  1381  		list: {
  1382  			a: [1]
  1383  		}
  1384  		listStruct: {
  1385  			a: [{
  1386  				a: 1
  1387  			}]
  1388  		}
  1389  		listEmbed: {
  1390  			a: [1]
  1391  		}
  1392  	}
  1393  	x: "foo"
  1394  	incomplete: {
  1395  		a: {
  1396  			x: "a \(run.a) z"
  1397  			run: {
  1398  				a: string
  1399  			}
  1400  		}
  1401  		b: {
  1402  			let A = run.a
  1403  			x: "a \(A) z"
  1404  			run: {
  1405  				a: string
  1406  			}
  1407  		}
  1408  		c: {
  1409  			let A_1 = run.a
  1410  			let A_2 = run2.a
  1411  			x:  "a \(A_1) z"
  1412  			x2: "a \(A_2) z"
  1413  			run: {
  1414  				a: string
  1415  			}
  1416  			run2: {
  1417  				a: string
  1418  			}
  1419  		}
  1420  		d: {
  1421  			let A_3 = run.a
  1422  			let A_4 = run2.a
  1423  			x:  "a \(A_3) z"
  1424  			x2: "a \(A_4) z"
  1425  			run: {
  1426  				a: string
  1427  			}
  1428  			run2: {
  1429  				a: string
  1430  			}
  1431  		}
  1432  	}
  1433  	unresolvedDisjunction: {
  1434  		#TypePrimitive: {
  1435  			_args: {
  1436  				required: bool
  1437  			}
  1438  			"*": {}
  1439  		}
  1440  		#TypeBool: {
  1441  			let Args = _args
  1442  			_args: {
  1443  				required: bool
  1444  			}
  1445  
  1446  			if !Args.required {
  1447  				// `default` sets the default value.
  1448  				default: bool | null
  1449  			}
  1450  		}
  1451  	}
  1452  	y: "foo"
  1453  }
  1454  == Eval
  1455  {
  1456  	comprehension: {
  1457  		for cfg in [{
  1458  			a: "one"
  1459  		}] {
  1460  			let filepath = "kind-\(cfg.name)"
  1461  			"\(filepath)": {
  1462  				patches: cfg
  1463  			}
  1464  		}
  1465  	}
  1466  	#Foo: 2
  1467  	complete: {
  1468  		x: "a foo z"
  1469  		run: {
  1470  			a: "foo"
  1471  		}
  1472  	}
  1473  	cfgs: [{
  1474  		metadata: {
  1475  			name: "one"
  1476  		}
  1477  	}, {
  1478  		metadata: {
  1479  			name: "two"
  1480  		}
  1481  	}]
  1482  	files: {
  1483  		"\("kind-\(cfg.name)")": {
  1484  			patches: cfg
  1485  		}
  1486  	}
  1487  	scoped: {
  1488  		direct: {
  1489  			a: 1
  1490  		}
  1491  		embed1: {
  1492  			a: 1
  1493  		}
  1494  		embed2: {
  1495  			a: 1
  1496  		}
  1497  		list: {
  1498  			a: [1]
  1499  		}
  1500  		listStruct: {
  1501  			a: [{
  1502  				a: 1
  1503  			}]
  1504  		}
  1505  		listEmbed: {
  1506  			a: [1]
  1507  		}
  1508  	}
  1509  	x: "foo"
  1510  	incomplete: {
  1511  		a: {
  1512  			x: "a \(run.a) z"
  1513  			run: {
  1514  				a: string
  1515  			}
  1516  		}
  1517  		b: {
  1518  			let A = run.a
  1519  			x: "a \(A) z"
  1520  			run: {
  1521  				a: string
  1522  			}
  1523  		}
  1524  		c: {
  1525  			let A_1 = run.a
  1526  			let A_2 = run2.a
  1527  			x:  "a \(A_1) z"
  1528  			x2: "a \(A_2) z"
  1529  			run: {
  1530  				a: string
  1531  			}
  1532  			run2: {
  1533  				a: string
  1534  			}
  1535  		}
  1536  		d: {
  1537  			let A_3 = run.a
  1538  			let A_4 = run2.a
  1539  			x:  "a \(A_3) z"
  1540  			x2: "a \(A_4) z"
  1541  			run: {
  1542  				a: string
  1543  			}
  1544  			run2: {
  1545  				a: string
  1546  			}
  1547  		}
  1548  	}
  1549  	unresolvedDisjunction: {
  1550  		#TypePrimitive: {
  1551  			"*": {}
  1552  		}
  1553  		#TypeBool: {
  1554  			let Args = _args
  1555  			_args: {
  1556  				required: bool
  1557  			}
  1558  
  1559  			if !Args.required {
  1560  				default: bool | null
  1561  			}
  1562  		}
  1563  	}
  1564  	y: "foo"
  1565  }