]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use type position for error message in align.go
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Mon, 19 Oct 2020 11:32:15 +0000 (18:32 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Tue, 20 Oct 2020 02:05:01 +0000 (02:05 +0000)
commitbccdd31252c9771ef2e8dae0402251163a081b56
treece0647d8d131c4b2256c97c4fbe7a7fdaa982f08
parenta505312c89a0468081173da3042de6ac8582a3ba
cmd/compile: use type position for error message in align.go

This helps the compiler reports the right place where the type declared,
instead of relying on global lineno, which maybe set to wrong value at
the time the error is reported.

Fixes #42058

Change-Id: I06d34aa9b0236d122f4a0d72e66675ded022baac
Reviewed-on: https://go-review.googlesource.com/c/go/+/263597
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/compile/internal/gc/align.go
src/go/types/stdlib_test.go
test/fixedbugs/issue42058a.go [new file with mode: 0644]
test/fixedbugs/issue42058b.go [new file with mode: 0644]