The results in two circumstances should be the same. Both of them should be true.
What did you see instead?
They are not. Quite confusing for newbies.
The text was updated successfully, but these errors were encountered:
ngolin
changed the title
cmd: comparison of pointers to zero sized values is inconsistent
cmd/compile: comparison of pointers to zero sized values is inconsistent
May 8, 2022
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Given
var s1 struct{}
andvar s2 struct{}
, the result of&s1 == &s2
is inconsistent:the following snippet yielding
false
:while this snippet yielding
true
:What did you expect to see?
The results in two circumstances should be the same. Both of them should be
true
.What did you see instead?
They are not. Quite confusing for newbies.
The text was updated successfully, but these errors were encountered: