mirror of
https://github.com/golang/go
synced 2024-11-23 05:20:11 -07:00
bccdd31252
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>
14 lines
332 B
Go
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"
|