What version of Go are you using (go version)?
$ go version
tip
Does this issue reproduce with the latest release?
yes.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
What did you do?
https://go.dev/play/p/tdRYybgfMzt?v=gotip
What did you expect to see?
I hope to see the compilation pass.
I think local variables should be able to obtain addresses.
What did you see instead?
./prog.go:23:7: invalid operation: cannot take address of I1(j) (value of type I1)
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 envOutputWhat did you do?
https://go.dev/play/p/tdRYybgfMzt?v=gotip
What did you expect to see?
I hope to see the compilation pass.
I think local variables should be able to obtain addresses.
What did you see instead?
./prog.go:23:7: invalid operation: cannot take address of I1(j) (value of type I1)