We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Another allegedly contrived - but valid - use of self-referencing types. After declaring
import "fmt" type X struct { *X } var x X
the call fmt.Println(x.X) should print nil - instead it prints [] - a very minor issue.
fmt.Println(x.X)
[]
The real issue is that
fmt.Println(x.X.X)
should panic due to nil pointer dereference - instead it succeeds and prints <nil>
<nil>
Go playground behaviour is to print <nil> then panic: https://play.golang.org/p/n04z_sZemno
The text was updated successfully, but these errors were encountered:
Thanks @cosmos72 !
Sorry, something went wrong.
No branches or pull requests
Another allegedly contrived - but valid - use of self-referencing types. After declaring
the call
fmt.Println(x.X)
should print nil - instead it prints[]
- a very minor issue.The real issue is that
should panic due to nil pointer dereference - instead it succeeds and prints
<nil>
Go playground behaviour is to print
<nil>
then panic: https://play.golang.org/p/n04z_sZemnoThe text was updated successfully, but these errors were encountered: