]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/gc: detect bad append(f()) during type check
authorRuss Cox <rsc@golang.org>
Mon, 11 May 2015 20:12:01 +0000 (16:12 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 12 May 2015 16:26:35 +0000 (16:26 +0000)
commit3f209abb2954bfb89e3dbd28ed0a622a6fe33242
tree96db8390cc58679eaee6d90ad17325f43a10b13a
parent29dc4b40f85fdb0985eea3e718385dc3c6cd22b7
cmd/internal/gc: detect bad append(f()) during type check

Today's earlier fix can stay, but it's a band-aid over the real problem,
which is that bad code was slipping through the type checker
into the back end (and luckily causing a type error there).

I discovered this because my new append does not use the same
temporaries and failed the test as written.

Fixes #9521.

Change-Id: I7e33e2ea15743406e15c6f3fdf73e1edecda69bd
Reviewed-on: https://go-review.googlesource.com/9921
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/internal/gc/typecheck.go
test/fixedbugs/issue9521.go