blob: ba80464907be5c4e33c64203cb28519eb7d3796e [file] [log] [blame]
Russ Coxd2cc9882012-02-16 23:50:37 -05001// errorcheck
Russ Cox896f0c62012-02-10 23:10:45 -05002
3// Copyright 2012 The Go Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7package p
8
9func f(i int) int { return i }
10
Ian Lance Taylor6ed800c2012-09-28 08:30:30 -070011var i = func() int {a := f(i); return a}() // ERROR "initialization loop|depends upon itself"