babygo icon indicating copy to clipboard operation
babygo copied to clipboard

slice == nil comparison

Open DQNEO opened this issue 4 years ago • 1 comments

Currently in some cases slice == nil gives false even if slice is nil.

Expected results

when slice is nil,

expression value
slice == nil true
nil == slice true
slice =! nil false
nil != slice false

when slice is non-nil,

expression value
slice == nil false
nil == slice false
slice =! nil true
nil != slice true

DQNEO avatar Jul 25 '20 12:07 DQNEO

This case works accidentally :)

DQNEO avatar Jul 18 '23 15:07 DQNEO