eval `nil > 1` returns true
praveen-tt opened this issue · 2 comments
praveen-tt commented
I am accessing a map or struct fields in expression string, and in case field is not present in map or struct and if compared like Person.Age > 30 then return true.
Reduced issue is "nil > somevalue" return true.
generikvault commented
Yeah nil < 30
is not defined but the lexical order "nil" < "30"
is and the values are automatically converted into string.
In this case it's really undesirable.
generikvault commented
"nil > somevalue" returns an error know