summaryrefslogtreecommitdiff
path: root/test/fixedbugs
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-08-12 13:18:54 -0700
committerRuss Cox <rsc@golang.org>2009-08-12 13:18:54 -0700
commit00d3aec9c798ffa5b27c50eae9feb8fd382913d3 (patch)
tree5c642bf4fc333537144c9e43fc2bc06bce4f8a52 /test/fixedbugs
parentf07be25e900e7bf3bdb9f172d50e1f30669270a8 (diff)
downloadgo-00d3aec9c798ffa5b27c50eae9feb8fd382913d3.tar.gz
convert non-pkg go files to whole-package compilation.
mostly removing forward declarations. R=r DELTA=138 (2 added, 127 deleted, 9 changed) OCL=33068 CL=33099
Diffstat (limited to 'test/fixedbugs')
-rw-r--r--test/fixedbugs/bug043.go23
-rw-r--r--test/fixedbugs/bug044.go29
-rw-r--r--test/fixedbugs/bug085.go4
3 files changed, 2 insertions, 54 deletions
diff --git a/test/fixedbugs/bug043.go b/test/fixedbugs/bug043.go
deleted file mode 100644
index 65d720b80..000000000
--- a/test/fixedbugs/bug043.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2009 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.
-
-// $G $D/$F.go && $L $F.$A && ./$A.out
-
-// Forward declarations
-
-package main
-
-func f (x int) ; // this works
-func f (x int) {}
-
-func i (x, y int) ; // this works
-func i (x, y int) {}
-
-func g (x int) float ; // BUG this doesn't
-func g (x int) float { return 0.0 }
-
-func h (x int) (u int, v int) ; // BUG this doesn't
-func h (x int) (u int, v int) { return; }
-
-func main() {}
diff --git a/test/fixedbugs/bug044.go b/test/fixedbugs/bug044.go
deleted file mode 100644
index 789237abe..000000000
--- a/test/fixedbugs/bug044.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 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.
-
-// $G $D/$F.go && $L $F.$A && ./$A.out
-
-package main
-
-type S struct {
-};
-
-func (p *S) M1a() ;
-
-func (p *S) M2a() {
- p.M1a();
-}
-
-func (p *S) M1a() {} // this works
-
-
-func (p *S) M1b() int;
-
-func (p *S) M2b() {
- p.M1b();
-}
-
-func (p *S) M1b() int { return 0 } // BUG this doesn't
-
-func main() {}
diff --git a/test/fixedbugs/bug085.go b/test/fixedbugs/bug085.go
index c1133fe92..02be71753 100644
--- a/test/fixedbugs/bug085.go
+++ b/test/fixedbugs/bug085.go
@@ -9,11 +9,11 @@ package P
var x int
func foo() {
- print(P.x); // P should be defined between the outermost "universe" scope and the global scope
+ print(P.x); // ERROR "undefined"
}
/*
-uetli:~/Source/go1/test/bugs gri$ 6g bug085.go
+uetli:~/Source/go1/test/bugs gri$ 6g bug085.go
bug085.go:6: P: undefined
Bus error
*/