-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Equality is incorrect when
nil
is used as the left argument of ==
hi! this issue is sorta blocking for me so i thought i would try to fix it. im still learning the codebase and understanding how yaegi works, but I thought I would attempt to add a test in the style of other tests as a start. please let me know if there is anything i need to change / run, or if anyone knows perhaps a good place to start for tackling this issue Fixes #1496
- Loading branch information
Showing
3 changed files
with
75 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package main | ||
|
||
func main() { | ||
a := []byte{} == nil | ||
b := nil == []byte{} | ||
c := nil == &struct{}{} | ||
i := 100 | ||
d := nil == &i | ||
var v interface{} | ||
f := nil == v | ||
g := v == nil | ||
println(a, b, c, d, f, g) | ||
} | ||
|
||
// Output: | ||
// false false false false true true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters