File: issue2550.txtar

package info (click to toggle)
golang-github-cue-lang-cue 0.14.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,644 kB
  • sloc: makefile: 20; sh: 15
file content (81 lines) | stat: -rw-r--r-- 1,351 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
-- in.cue --
foo: string
bar: close({})

if bar.missing == "x" {
	let _bar = bar
	foo: _bar
}
-- out/compile --
--- in.cue
{
  foo: string
  bar: close({})
  if (〈0;bar〉.missing == "x") {
    let _bar#1 = 〈1;bar〉
    foo: 〈0;let _bar#1〉
  }
}
-- out/eval/stats --
Leaks:  1
Freed:  4
Reused: 1
Allocs: 4
Retain: 2

Unifications: 5
Conjuncts:    5
Disjuncts:    6

NumCloseIDs: 1
-- out/eval --
Errors:
undefined field: missing:
    ./in.cue:4:8

Result:
(_|_){
  // [eval] undefined field: missing:
  //     ./in.cue:4:8
  foo: (string){ string }
  bar: (#struct){
  }
  let _bar#1 = (_){ _ }
}
-- out/evalalpha --
Errors:
undefined field: missing:
    ./in.cue:4:8

Result:
(_|_){
  // [eval] undefined field: missing:
  //     ./in.cue:4:8
  foo: (_|_){
    // [incomplete] undefined field: missing:
    //     ./in.cue:4:8
  }
  bar: (#struct){
  }
  let _bar#1multi = 〈1;bar〉
}
-- diff/-out/evalalpha<==>+out/eval --
diff old new
--- old
+++ new
@@ -6,8 +6,11 @@
 (_|_){
   // [eval] undefined field: missing:
   //     ./in.cue:4:8
-  foo: (string){ string }
+  foo: (_|_){
+    // [incomplete] undefined field: missing:
+    //     ./in.cue:4:8
+  }
   bar: (#struct){
   }
-  let _bar#1 = (_){ _ }
+  let _bar#1multi = 〈1;bar〉
 }
-- diff/todo/p2 --
Let seems to have misplaced error, even though it does not affect outcome.