File tree Expand file tree Collapse file tree 2 files changed +11
-58
lines changed Expand file tree Collapse file tree 2 files changed +11
-58
lines changed Original file line number Diff line number Diff line change @@ -33,63 +33,6 @@ Disjuncts: 12
33
33
34
34
CloseIDElems: 0
35
35
NumCloseIDs: 2
36
- -- out/evalalpha --
37
- Errors:
38
- issue3972.output.out1: error in call to encoding/yaml.Marshal: BUG: non-stringifiable *adt.scheduler:
39
- ./in.cue:19:16
40
-
41
- Result:
42
- (_|_){
43
- // [eval]
44
- issue3972: (_|_){
45
- // [eval]
46
- output: (_|_){
47
- // [eval]
48
- out0: (string){ "static" }
49
- out1: (_|_){
50
- // [eval] issue3972.output.out1: error in call to encoding/yaml.Marshal: BUG: non-stringifiable *adt.scheduler:
51
- // ./in.cue:19:16
52
- }
53
- }
54
- input: (struct){
55
- inputStatic: (string){ "static" }
56
- }
57
- derived: (struct){
58
- derivedStatic: (string){ "static" }
59
- }
60
- _out1: (#list){
61
- 0: (string){ "derivedStatic" }
62
- }
63
- }
64
- }
65
- -- diff/-out/evalalpha<==>+out/eval --
66
- diff old new
67
- --- old
68
- +++ new
69
- @@ -1,8 +1,19 @@
70
- -(struct){
71
- - issue3972: (struct){
72
- - output: (struct){
73
- +Errors:
74
- +issue3972.output.out1: error in call to encoding/yaml.Marshal: BUG: non-stringifiable *adt.scheduler:
75
- + ./in.cue:19:16
76
- +
77
- +Result:
78
- +(_|_){
79
- + // [eval]
80
- + issue3972: (_|_){
81
- + // [eval]
82
- + output: (_|_){
83
- + // [eval]
84
- out0: (string){ "static" }
85
- - out1: (string){ "- derivedStatic\n" }
86
- + out1: (_|_){
87
- + // [eval] issue3972.output.out1: error in call to encoding/yaml.Marshal: BUG: non-stringifiable *adt.scheduler:
88
- + // ./in.cue:19:16
89
- + }
90
- }
91
- input: (struct){
92
- inputStatic: (string){ "static" }
93
36
-- out/eval --
94
37
(struct){
95
38
issue3972: (struct){
Original file line number Diff line number Diff line change @@ -418,7 +418,17 @@ func (c *OpContext) PopArcAndLabel(saved *Vertex) {
418
418
//
419
419
// Should only be used to insert Conjuncts. TODO: perhaps only return Conjuncts
420
420
// and error.
421
- func (c * OpContext ) Resolve (x Conjunct , r Resolver ) (* Vertex , * Bottom ) {
421
+ func (c * OpContext ) Resolve (x Conjunct , r Resolver ) (v * Vertex , b * Bottom ) {
422
+ defer func () {
423
+ x := recover ()
424
+ switch x .(type ) {
425
+ case nil :
426
+ case * scheduler :
427
+ b = c .NewErrf ("unresolved value %s" , r )
428
+ default :
429
+ panic (x )
430
+ }
431
+ }()
422
432
return c .resolveState (x , r , final (finalized , allKnown ))
423
433
}
424
434
You can’t perform that action at this time.
0 commit comments