]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: avoid spurious errors for invalid map key types
authorgriesemer <gri@golang.org>
Thu, 2 Nov 2017 00:38:07 +0000 (17:38 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 2 Nov 2017 23:53:38 +0000 (23:53 +0000)
commit25159d3af98335cfe574c66224a8c31df25ecc15
treeef1670c4e986484f404b5aa7df676492fa96ad1c
parentaec345d638fa624f08b7d758e9e173897edc80e8
cmd/compile: avoid spurious errors for invalid map key types

Instead of trying to validate map key types eagerly in some
cases, delay their validation to the end of type-checking,
when we all type information is present.

Passes go build -toolexec 'toolstash -cmp' -a std .

Fixes #21273.
Fixes #21657.

Change-Id: I532369dc91c6adca1502d6aa456bb06b57e6c7ff
Reviewed-on: https://go-review.googlesource.com/75310
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/align.go
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/gc/typecheck.go
test/fixedbugs/issue21273.go [new file with mode: 0644]