Commit 61d789db authored by Robert Griesemer's avatar Robert Griesemer
Browse files

cmd/compile/internal/types2: report error for incomplete struct composite literal type

Mark a struct as "complete" with a non-nil (but possibly zero length)
fields list. Add a test when type-checking struct composite literals,
the same way we do for other composite literal types.

Fixes #49276.

Change-Id: If44a3d790bf7032ddcd155af49bdc47b1cdff4fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/361412


Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: default avatarRobert Findley <rfindley@google.com>
parent cfb3dc77
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment