File: and.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 (52 lines) | stat: -rw-r--r-- 714 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
-- in.cue --
merge: and([1, 1])

// ensure definitions along embedded scalars are preserved.
embed: and([{2, #x: 1}, {2, #x: 2}])
-- out/eval/stats --
Leaks:  2
Freed:  4
Reused: 1
Allocs: 5
Retain: 2

Unifications: 6
Conjuncts:    13
Disjuncts:    6
-- out/eval --
Errors:
embed.#x: conflicting values 2 and 1:
    ./in.cue:4:21
    ./in.cue:4:33

Result:
(_|_){
  // [eval]
  merge: (int){ 1 }
  embed: (_|_){
    // [eval]
    #x: (_|_){
      // [eval] embed.#x: conflicting values 2 and 1:
      //     ./in.cue:4:21
      //     ./in.cue:4:33
    }
  }
}
-- out/compile --
--- in.cue
{
  merge: and([
    1,
    1,
  ])
  embed: and([
    {
      2
      #x: 1
    },
    {
      2
      #x: 2
    },
  ])
}