diff options
| author | Robert Griesemer <gri@golang.org> | 2018-02-21 20:27:29 -0800 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2018-02-22 16:28:38 +0000 |
| commit | 2465ae64591a0be336f0b0b654e1c02c89fdbe4e (patch) | |
| tree | 83563f4cbd5e9b54bdd319fab053692b97588a88 /src/syscall/syscall_linux.go | |
| parent | 7113d3a512b17d1acea0904a2e5590fdfbd388bb (diff) | |
| download | go-2465ae64591a0be336f0b0b654e1c02c89fdbe4e.tar.xz | |
go/types: fix regression with short variable declarations
The variables on the lhs of a short variable declaration are
only in scope after the variable declaration. Specifically,
function literals on the rhs of a short variable declaration
must not see newly declared variables on the lhs.
This used to work and this bug was likely introduced with
https://go-review.googlesource.com/c/go/+/83397 for go1.11.
Luckily this is just an oversight and the fix is trivial:
Simply use the mechanism for delayed type-checkin of function
literals introduced in the before-mentioned change here as well.
Fixes #24026.
Change-Id: I74ce3a0d05c5a2a42ce4b27601645964f906e82d
Reviewed-on: https://go-review.googlesource.com/96177
Reviewed-by: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'src/syscall/syscall_linux.go')
0 files changed, 0 insertions, 0 deletions
