cmd/compile: invalid field name *** in struct initializer #50848
Labels
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
What version of Go are you using (
go version
)?go 1.18beta1
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?
when I was playing with generics I discovered a subtle (possible) compiler bug.
go1.18beta1 vet
andgo1.18beta1 build
gives me no complaint but thego1.18beta1 test
failed out of no good reason.The offending code is isolated in https://github.com/Reasno/go1.18beta1bug.
The code with generic:
and the test file:
What did you expect to see?
The
go1.18beta1 test
compilation should be green.What did you see instead?
go1.18beta1 test
rants: ../main.go:10:24: invalid field name bar.field in struct initializerThe text was updated successfully, but these errors were encountered: