mirror of
https://github.com/golang/go
synced 2024-11-14 07:50:21 -07:00
703bd83623
This is a first of a set of changes to make the transition away from NodeList easier by removing cases in which NodeList doesn't act semi-trivially like a []*Node. This CL was originally prepared by Josh Bleecher Snyder <josharian@gmail.com>. This change passes go build -toolexec 'toolstash -cmp' -a std. Change-Id: Iad10b75e42b5b24e1694407841282fa3bab2dc9f Reviewed-on: https://go-review.googlesource.com/14232 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
18 lines
387 B
Go
18 lines
387 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 initialization loops are caught
|
|
// and that the errors print correctly.
|
|
|
|
package main
|
|
|
|
var (
|
|
x int = a
|
|
a int = b // ERROR "a refers to\n.*b refers to\n.*c refers to\n.*a"
|
|
b int = c
|
|
c int = a
|
|
)
|