File: 046_predefined_ranges.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-- 936 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
#name: predefined ranges
#evalPartial
-- in.cue --
k1: int8
k1: 44

k2: int64
k2: -8_000_000_000

e1: int16
e1: 100_000
-- out/def --
k1: 44
k2: -8000000000
e1: _|_ // invalid value 100000 (out of bound int & <=32767)
-- out/legacy-debug --
<0>{k1: 44, k2: -8000000000, e1: _|_((int & <=32767 & 100000):invalid value 100000 (out of bound int & <=32767))}
-- out/compile --
--- in.cue
{
  k1: &(int, >=-128, <=127)
  k1: 44
  k2: &(int, >=-9223372036854775808, <=9223372036854775807)
  k2: -8000000000
  e1: &(int, >=-32768, <=32767)
  e1: 100000
}
-- out/eval/stats --
Leaks:  0
Freed:  4
Reused: 2
Allocs: 2
Retain: 0

Unifications: 4
Conjuncts:    7
Disjuncts:    4
-- out/eval --
Errors:
e1: invalid value 100000 (out of bound <=32767):
    ./in.cue:8:5

Result:
(_|_){
  // [eval]
  k1: (int){ 44 }
  k2: (int){ -8000000000 }
  e1: (_|_){
    // [eval] e1: invalid value 100000 (out of bound <=32767):
    //     ./in.cue:8:5
  }
}