github.com/solo-io/cue@v0.4.7/cue/testdata/basicrewrite/017_null.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  #name: null
     4  #evalPartial
     5  -- in.cue --
     6  eql: null == null
     7  neq: null != null
     8  unf: null & null
     9  
    10  // errors
    11  eq1:  null == 1
    12  eq2:  1 == null
    13  ne1:  "s" != null
    14  call: null()
    15  -- out/def --
    16  eql: true
    17  neq: false
    18  unf: null
    19  
    20  // errors
    21  eq1:  false
    22  eq2:  false
    23  ne1:  true
    24  call: _|_ // cannot call non-function null (type null)
    25  -- out/legacy-debug --
    26  <0>{eql: true, neq: false, unf: null, eq1: false, eq2: false, ne1: true, call: _|_(null:cannot call non-function null (type null))}
    27  -- out/compile --
    28  --- in.cue
    29  {
    30    eql: (null == null)
    31    neq: (null != null)
    32    unf: (null & null)
    33    eq1: (null == 1)
    34    eq2: (1 == null)
    35    ne1: ("s" != null)
    36    call: null()
    37  }
    38  -- out/eval --
    39  Errors:
    40  call: cannot call non-function null (type null):
    41      ./in.cue:9:7
    42  
    43  Result:
    44  (_|_){
    45    // [eval]
    46    eql: (bool){ true }
    47    neq: (bool){ false }
    48    unf: (null){ null }
    49    eq1: (bool){ false }
    50    eq2: (bool){ false }
    51    ne1: (bool){ true }
    52    call: (_|_){
    53      // [eval] call: cannot call non-function null (type null):
    54      //     ./in.cue:9:7
    55    }
    56  }