diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-08-03 17:26:15 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-08-03 17:31:49 +0200 |
| commit | b757d264230d65f988e08158e096a09497d39eb4 (patch) | |
| tree | e20ec608a2ec8ebf603fa7aa060eb9723c4780b9 /test/fixedbugs/bug359.go | |
| parent | 5976088995f5c0d0bcada7d491fda4b6245e54e0 (diff) | |
| download | golang-b757d264230d65f988e08158e096a09497d39eb4.tar.gz | |
Imported Upstream version 2011.07.29
Diffstat (limited to 'test/fixedbugs/bug359.go')
| -rw-r--r-- | test/fixedbugs/bug359.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/fixedbugs/bug359.go b/test/fixedbugs/bug359.go new file mode 100644 index 000000000..6ced608bc --- /dev/null +++ b/test/fixedbugs/bug359.go @@ -0,0 +1,26 @@ +// errchk $G $D/$F.go + +// Copyright 2011 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. + +// issue 1910 +// error on wrong line + +package main + +import "container/list" + +type Painting struct { + fragments list.List // private +} + +func (p Painting) Foo() { + for e := p.fragments; e.Front() != nil; e = e.Next() { // ERROR "unexported field" + } +} + +// from comment 4 of issue 1910 +type Foo interface { + Run(a int) (a int) // ERROR "a redeclared" +} |
