1
0
mirror of https://github.com/golang/go synced 2024-09-25 13:20:13 -06:00
go/test/fixedbugs/issue42058a.go
Cuong Manh Le bccdd31252 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>
2020-10-20 02:05:01 +00:00

14 lines
332 B
Go

// errorcheck
// Copyright 2020 The Go Authors. All rights reserved. Use of this
// source code is governed by a BSD-style license that can be found in
// the LICENSE file.
package p
var c chan [2 << 16]byte // ERROR "channel element type too large"
type T [1 << 17]byte
var x chan T // ERROR "channel element type too large"