File: 049_self-reference_cycles_conflicts_with_strings.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 (55 lines) | stat: -rw-r--r-- 866 bytes parent folder | download | duplicates (2)
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
#name: self-reference cycles conflicts with strings
#evalPartial
-- in.cue --
a: {
	x: y + "?"
	y: x + "!"
}
a: x: "hey"
-- out/def --
a: {
	x: _|_ // conflicting values "hey!?" and "hey"
	y: "hey!"
}
-- out/legacy-debug --
<0>{a: <1>{x: _|_(("hey!?" & "hey"):conflicting values "hey!?" and "hey"), y: "hey!"}}
-- out/compile --
--- in.cue
{
  a: {
    x: (怈0;y怉 + "?")
    y: (怈0;x怉 + "!")
  }
  a: {
    x: "hey"
  }
}
-- out/eval/stats --
Leaks:  0
Freed:  4
Reused: 0
Allocs: 4
Retain: 1

Unifications: 4
Conjuncts:    5
Disjuncts:    5
-- out/eval --
Errors:
a.x: conflicting values "hey!?" and "hey":
    ./in.cue:2:5
    ./in.cue:5:7

Result:
(_|_){
  // [eval]
  a: (_|_){
    // [eval]
    x: (_|_){
      // [eval] a.x: conflicting values "hey!?" and "hey":
      //     ./in.cue:2:5
      //     ./in.cue:5:7
    }
    y: (string){ "hey!" }
  }
}