@@ -227,16 +227,24 @@ issue3672: {
227
227
v: #def
228
228
v: x: [{y: true}] // Should be one element
229
229
}
230
+ issue3681: {
231
+ // Order dependent! These two fields need to go first.
232
+ out: one: #strDefaultDef
233
+ out: two: "\(strDefault)"
234
+
235
+ strDefault: *"fallback" | string
236
+ #strDefaultDef: strDefault
237
+ }
230
238
-- out/eval/stats --
231
239
Leaks: 10
232
- Freed: 625
233
- Reused: 611
240
+ Freed: 637
241
+ Reused: 623
234
242
Allocs: 24
235
243
Retain: 39
236
244
237
- Unifications: 326
238
- Conjuncts: 1213
239
- Disjuncts: 640
245
+ Unifications: 332
246
+ Conjuncts: 1229
247
+ Disjuncts: 652
240
248
-- out/evalalpha --
241
249
Errors:
242
250
f: 2 errors in empty disjunction:
@@ -306,6 +314,17 @@ Result:
306
314
}
307
315
}
308
316
}
317
+ issue3681: (struct){
318
+ out: (struct){
319
+ one: (string){ |(*(string){ "fallback" }, (string){ string }) }
320
+ two: (_|_){
321
+ // [incomplete] issue3681.out.two: invalid interpolation: non-concrete value _ (type _):
322
+ // ./dependencies.cue:26:12
323
+ }
324
+ }
325
+ strDefault: (string){ |(*(string){ "fallback" }, (string){ string }) }
326
+ #strDefaultDef: (string){ |(*(string){ "fallback" }, (string){ string }) }
327
+ }
309
328
a: (int){ |(*(int){ 1 }, (int){ int }) }
310
329
aa: (int){ |(*(int){ 1 }, *(int){ 2 }, (int){ int }) }
311
330
b: (struct){ |((struct){
@@ -628,7 +647,19 @@ diff old new
628
647
}
629
648
#S: ((string|struct)){ |((string){ string }, (#struct){
630
649
}) }
631
- @@ -102,19 +91,12 @@
650
+ @@ -80,7 +69,10 @@
651
+ issue3681: (struct){
652
+ out: (struct){
653
+ one: (string){ |(*(string){ "fallback" }, (string){ string }) }
654
+ - two: (string){ "fallback" }
655
+ + two: (_|_){
656
+ + // [incomplete] issue3681.out.two: invalid interpolation: non-concrete value _ (type _):
657
+ + // ./dependencies.cue:26:12
658
+ + }
659
+ }
660
+ strDefault: (string){ |(*(string){ "fallback" }, (string){ string }) }
661
+ #strDefaultDef: (string){ |(*(string){ "fallback" }, (string){ string }) }
662
+ @@ -110,19 +102,12 @@
632
663
// [eval] f: 2 errors in empty disjunction:
633
664
// f.name: conflicting values "int" and "str":
634
665
// ./in.cue:5:8
@@ -649,7 +680,7 @@ diff old new
649
680
}
650
681
e1: (struct){
651
682
a: ((null|struct)){ |((null){ null }, (struct){
652
- @@ -226 ,8 +208 ,8 @@
683
+ @@ -234 ,8 +219 ,8 @@
653
684
e: (struct){
654
685
foobar: (#struct){
655
686
b: (#struct){
@@ -659,7 +690,7 @@ diff old new
659
690
}
660
691
}
661
692
}
662
- @@ -329 ,6 +311 ,9 @@
693
+ @@ -337 ,6 +322 ,9 @@
663
694
let Ok#1 = (bool){ true }
664
695
}, (#struct){
665
696
_ok: (bool){ true }
@@ -756,6 +787,14 @@ Result:
756
787
}
757
788
}
758
789
}
790
+ issue3681: (struct){
791
+ out: (struct){
792
+ one: (string){ |(*(string){ "fallback" }, (string){ string }) }
793
+ two: (string){ "fallback" }
794
+ }
795
+ strDefault: (string){ |(*(string){ "fallback" }, (string){ string }) }
796
+ #strDefaultDef: (string){ |(*(string){ "fallback" }, (string){ string }) }
797
+ }
759
798
a: (int){ |(*(int){ 1 }, (int){ int }) }
760
799
aa: (int){ |(*(int){ 1 }, *(int){ 2 }, (int){ int }) }
761
800
b: (struct){ |((struct){
@@ -1077,6 +1116,16 @@ Result:
1077
1116
]
1078
1117
}
1079
1118
}
1119
+ issue3681: {
1120
+ out: {
1121
+ one: 〈1;#strDefaultDef〉
1122
+ }
1123
+ out: {
1124
+ two: "\(〈1;strDefault〉)"
1125
+ }
1126
+ strDefault: (*"fallback"|string)
1127
+ #strDefaultDef: 〈0;strDefault〉
1128
+ }
1080
1129
}
1081
1130
--- in.cue
1082
1131
{
0 commit comments