mirror of
https://github.com/golang/go
synced 2024-11-15 00:10:28 -07:00
e18cd34c76
- use same local variable name (lno) for line number for LCOLAS everywhere - remove now unneeded assignment of line number to yylval.i in lexer Fix per suggestion of mdempsky. Fixes #13415. Change-Id: Ie3c7f5681615042a12b81b26724b3a5d8a979c25 Reviewed-on: https://go-review.googlesource.com/17248 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
20 lines
465 B
Go
20 lines
465 B
Go
// errorcheck
|
|
|
|
// Copyright 2015 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.
|
|
|
|
// Verify that error message regarding := appears on
|
|
// correct line (and not on the line of the 2nd :=).
|
|
|
|
package p
|
|
|
|
func f() {
|
|
select {
|
|
case x, x := <-func() chan int { // ERROR "x repeated on left side of :="
|
|
c := make(chan int)
|
|
return c
|
|
}():
|
|
}
|
|
}
|