diff --git a/cue/testdata/cycle/disjunction.txtar b/cue/testdata/cycle/disjunction.txtar index 7825fc35a6a..5998e43c0ed 100644 --- a/cue/testdata/cycle/disjunction.txtar +++ b/cue/testdata/cycle/disjunction.txtar @@ -158,7 +158,6 @@ issue3042.data.secret: conflicting values string and {infra:[{name:"bar1"}]} (mi ./issue3042.cue:8:11 issue3042.data.secret: field not allowed: ./issue3042.cue:8:3 -issue3042.data.secret.infra: adding field name not allowed as field set was already referenced issue3042.data.secret.infra: conflicting values [{name:"bar1"}] and string (mismatched types list and string): ./issue3042.cue:5:12 ./issue3042.cue:9:11 @@ -277,7 +276,6 @@ Result: // ./issue3042.cue:8:11 // issue3042.data.secret: field not allowed: // ./issue3042.cue:8:3 - // issue3042.data.secret.infra: adding field name not allowed as field set was already referenced // issue3042.data.secret.infra: conflicting values [{name:"bar1"}] and string (mismatched types list and string): // ./issue3042.cue:5:12 // ./issue3042.cue:9:11 @@ -324,7 +322,7 @@ Result: diff old new --- old +++ new -@@ -1,9 +1,60 @@ +@@ -1,9 +1,59 @@ Errors: cycle.a: structural cycle +issue3042.data: conflicting values [...#nesting] and {secret:{infra:[{name:"bar1"}]}} (mismatched types list and struct): @@ -341,7 +339,6 @@ diff old new + ./issue3042.cue:8:11 +issue3042.data.secret: field not allowed: + ./issue3042.cue:8:3 -+issue3042.data.secret.infra: adding field name not allowed as field set was already referenced +issue3042.data.secret.infra: conflicting values [{name:"bar1"}] and string (mismatched types list and string): + ./issue3042.cue:5:12 + ./issue3042.cue:9:11 @@ -386,7 +383,7 @@ diff old new cycle: (_|_){ // [structural cycle] a: (_|_){ -@@ -58,22 +109,70 @@ +@@ -58,22 +108,69 @@ x: (#list){ } } @@ -424,7 +421,6 @@ diff old new + // ./issue3042.cue:8:11 + // issue3042.data.secret: field not allowed: + // ./issue3042.cue:8:3 -+ // issue3042.data.secret.infra: adding field name not allowed as field set was already referenced + // issue3042.data.secret.infra: conflicting values [{name:"bar1"}] and string (mismatched types list and string): + // ./issue3042.cue:5:12 + // ./issue3042.cue:9:11 diff --git a/cue/testdata/eval/disjunctions.txtar b/cue/testdata/eval/disjunctions.txtar index 5bb6fc2b45d..358780c3ca0 100644 --- a/cue/testdata/eval/disjunctions.txtar +++ b/cue/testdata/eval/disjunctions.txtar @@ -138,16 +138,21 @@ issue3406: { d: kind: "foo" | "bar" d: { kind: "foo" } | { kind: "bar" } } +-- issue3411.cue -- +issue3411: { + x: y?: [...string] + x: {y: ["foo"]} | *{y: ["bar"]} +} -- out/eval/stats -- Leaks: 0 -Freed: 347 -Reused: 335 +Freed: 355 +Reused: 343 Allocs: 12 Retain: 0 -Unifications: 158 -Conjuncts: 633 -Disjuncts: 347 +Unifications: 164 +Conjuncts: 647 +Disjuncts: 355 -- out/evalalpha -- Errors: f.name: conflicting values "int" and "str": @@ -319,6 +324,17 @@ Result: kind: (string){ "bar" } }) } } + issue3411: (struct){ + x: (struct){ |(*(struct){ + y: (#list){ + 0: (string){ "bar" } + } + }, (struct){ + y: (#list){ + 0: (string){ "foo" } + } + }) } + } } -- diff/-out/evalalpha<==>+out/eval -- diff old new @@ -560,6 +576,17 @@ Result: kind: (string){ "bar" } }) } } + issue3411: (struct){ + x: (struct){ |(*(struct){ + y: (#list){ + 0: (string){ "bar" } + } + }, (struct){ + y: (#list){ + 0: (string){ "foo" } + } + }) } + } } -- out/compile -- --- in.cue @@ -762,3 +789,22 @@ Result: }) } } +--- issue3411.cue +{ + issue3411: { + x: { + y?: [ + ...string, + ] + } + x: ({ + y: [ + "foo", + ] + }|*{ + y: [ + "bar", + ] + }) + } +} diff --git a/internal/core/adt/eval_test.go b/internal/core/adt/eval_test.go index 25d49bf9a88..40a009b294f 100644 --- a/internal/core/adt/eval_test.go +++ b/internal/core/adt/eval_test.go @@ -89,6 +89,7 @@ var skipDebugDepErrors = map[string]int{ "disjunctions/embed": 6, "disjunctions/errors": 2, "eval/conjuncts": 3, + "eval/disjunctions": 1, "eval/issue2146": 4, "eval/issue599": 1, "export/031": 1, diff --git a/internal/core/adt/overlay.go b/internal/core/adt/overlay.go index 54d9df9cb0b..214bc4f9a45 100644 --- a/internal/core/adt/overlay.go +++ b/internal/core/adt/overlay.go @@ -434,8 +434,6 @@ func (ctx *overlayContext) cloneScheduler(dst, src *nodeContext) { ds.completed = ss.completed ds.needs = ss.needs ds.provided = ss.provided - ds.frozen = ss.frozen - ds.isFrozen = ss.isFrozen ds.counters = ss.counters ss.blocking = ss.blocking[:0]