ADAPT-Chase commited on
Commit
11617c4
·
verified ·
1 Parent(s): c4013ca

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/main.go +32 -0
  2. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z1.go +5 -0
  3. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z10.go +6 -0
  4. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z11.go +4 -0
  5. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z12.go +4 -0
  6. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z13.go +4 -0
  7. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z14.go +4 -0
  8. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z15.go +4 -0
  9. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z16.go +4 -0
  10. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z17.go +4 -0
  11. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z18.go +5 -0
  12. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z19.go +4 -0
  13. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z2.go +4 -0
  14. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z20.go +4 -0
  15. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z3.go +4 -0
  16. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z4.go +4 -0
  17. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z5.go +4 -0
  18. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z6.go +4 -0
  19. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z7.go +4 -0
  20. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z8.go +4 -0
  21. platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z9.go +4 -0
  22. platform/dbops/binaries/go/go/test/fixedbugs/bug083.dir/bug0.go +10 -0
  23. platform/dbops/binaries/go/go/test/fixedbugs/bug083.dir/bug1.go +14 -0
  24. platform/dbops/binaries/go/go/test/fixedbugs/bug088.dir/bug0.go +9 -0
  25. platform/dbops/binaries/go/go/test/fixedbugs/bug088.dir/bug1.go +23 -0
  26. platform/dbops/binaries/go/go/test/fixedbugs/bug106.dir/bug0.go +7 -0
  27. platform/dbops/binaries/go/go/test/fixedbugs/bug106.dir/bug1.go +8 -0
  28. platform/dbops/binaries/go/go/test/fixedbugs/bug133.dir/bug0.go +7 -0
  29. platform/dbops/binaries/go/go/test/fixedbugs/bug133.dir/bug1.go +9 -0
  30. platform/dbops/binaries/go/go/test/fixedbugs/bug133.dir/bug2.go +16 -0
  31. platform/dbops/binaries/go/go/test/fixedbugs/bug160.dir/x.go +8 -0
  32. platform/dbops/binaries/go/go/test/fixedbugs/bug160.dir/y.go +19 -0
  33. platform/dbops/binaries/go/go/test/fixedbugs/bug191.dir/a.go +14 -0
  34. platform/dbops/binaries/go/go/test/fixedbugs/bug191.dir/b.go +13 -0
  35. platform/dbops/binaries/go/go/test/fixedbugs/bug191.dir/main.go +17 -0
  36. platform/dbops/binaries/go/go/test/fixedbugs/bug222.dir/chanbug.go +9 -0
  37. platform/dbops/binaries/go/go/test/fixedbugs/bug222.dir/chanbug2.go +7 -0
  38. platform/dbops/binaries/go/go/test/fixedbugs/bug248.dir/bug0.go +13 -0
  39. platform/dbops/binaries/go/go/test/fixedbugs/bug248.dir/bug1.go +13 -0
  40. platform/dbops/binaries/go/go/test/fixedbugs/bug248.dir/bug2.go +73 -0
  41. platform/dbops/binaries/go/go/test/fixedbugs/bug248.dir/bug3.go +105 -0
  42. platform/dbops/binaries/go/go/test/fixedbugs/bug282.dir/p1.go +10 -0
  43. platform/dbops/binaries/go/go/test/fixedbugs/bug282.dir/p2.go +8 -0
  44. platform/dbops/binaries/go/go/test/fixedbugs/bug306.dir/p1.go +9 -0
  45. platform/dbops/binaries/go/go/test/fixedbugs/bug306.dir/p2.go +8 -0
  46. platform/dbops/binaries/go/go/test/fixedbugs/bug313.dir/a.go +11 -0
  47. platform/dbops/binaries/go/go/test/fixedbugs/bug313.dir/b.go +11 -0
  48. platform/dbops/binaries/go/go/test/fixedbugs/bug322.dir/lib.go +15 -0
  49. platform/dbops/binaries/go/go/test/fixedbugs/bug322.dir/main.go +40 -0
  50. platform/dbops/binaries/go/go/test/fixedbugs/bug324.dir/p.go +15 -0
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/main.go ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // $G $D/$F.go $D/z*.go && $L $F.$A && ./$A.out
2
+
3
+ // NOTE: This test is not run by 'run.go' and so not run by all.bash.
4
+ // To run this test you must use the ./run shell script.
5
+
6
+ // Copyright 2009 The Go Authors. All rights reserved.
7
+ // Use of this source code is governed by a BSD-style
8
+ // license that can be found in the LICENSE file.
9
+
10
+ package main
11
+ func main() {
12
+ F1()
13
+ F2()
14
+ F3()
15
+ F4()
16
+ F5()
17
+ F6()
18
+ F7()
19
+ F8()
20
+ F9()
21
+ F10()
22
+ F11()
23
+ F12()
24
+ F13()
25
+ F14()
26
+ F15()
27
+ F16()
28
+ F17()
29
+ F18()
30
+ F19()
31
+ F20()
32
+ }
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z1.go ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+
2
+
3
+ //line x1.go:4
4
+ package main
5
+ func F1() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z10.go ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+
2
+
3
+
4
+ //line x10.go:4
5
+ package main
6
+ func F10() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z11.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x11.go:4
3
+ package main
4
+ func F11() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z12.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x12.go:4
3
+ package main
4
+ func F12() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z13.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x13.go:4
3
+ package main
4
+ func F13() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z14.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x14.go:4
3
+ package main
4
+ func F14() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z15.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x15.go:4
3
+ package main
4
+ func F15() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z16.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x16.go:4
3
+ package main
4
+ func F16() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z17.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x17.go:4
3
+ package main
4
+ func F17() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z18.go ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+
2
+
3
+ //line x18.go:4
4
+ package main
5
+ func F18() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z19.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x19.go:4
3
+ package main
4
+ func F19() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z2.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x2.go:4
3
+ package main
4
+ func F2() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z20.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x20.go:4
3
+ package main
4
+ func F20() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z3.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x3.go:4
3
+ package main
4
+ func F3() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z4.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x4.go:4
3
+ package main
4
+ func F4() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z5.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x5.go:4
3
+ package main
4
+ func F5() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z6.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x6.go:4
3
+ package main
4
+ func F6() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z7.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x7.go:4
3
+ package main
4
+ func F7() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z8.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x8.go:4
3
+ package main
4
+ func F8() {}
platform/dbops/binaries/go/go/test/dwarf/dwarf.dir/z9.go ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ //line x9.go:4
3
+ package main
4
+ func F9() {}
platform/dbops/binaries/go/go/test/fixedbugs/bug083.dir/bug0.go ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package bug0
6
+
7
+ type t0 struct {
8
+ }
9
+
10
+ var V0 t0
platform/dbops/binaries/go/go/test/fixedbugs/bug083.dir/bug1.go ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package bug1
6
+
7
+ import "./bug0"
8
+
9
+ // This is expected to fail--t0 is in package bug0 and should not be
10
+ // visible here in package bug1. The test for failure is in
11
+ // ../bug083.go.
12
+
13
+ var v1 bug0.t0; // ERROR "bug0"
14
+
platform/dbops/binaries/go/go/test/fixedbugs/bug088.dir/bug0.go ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package bug0
6
+
7
+ var V0 func() int;
8
+ var V1 func() (a int);
9
+ var V2 func() (a, b int);
platform/dbops/binaries/go/go/test/fixedbugs/bug088.dir/bug1.go ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package main
6
+
7
+ import P "./bug0"
8
+
9
+ func main() {
10
+ a0 := P.V0(); // works
11
+ a1 := P.V1(); // works
12
+ a2, b2 := P.V2(); // doesn't work
13
+ _, _, _, _ = a0, a1, a2, b2;
14
+ }
15
+
16
+ /*
17
+ uetli:~/Source/go1/test/bugs/bug088.dir gri$ 6g bug0.go && 6g bug1.go
18
+ bug1.go:8: shape error across :=
19
+ bug1.go:8: a2: undefined
20
+ bug1.go:8: b2: undefined
21
+ bug1.go:8: illegal types for operand: AS
22
+ (<(bug0)P.int32>INT32)
23
+ */
platform/dbops/binaries/go/go/test/fixedbugs/bug106.dir/bug0.go ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package bug0
6
+
7
+ const A = -1
platform/dbops/binaries/go/go/test/fixedbugs/bug106.dir/bug1.go ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package bug1
6
+
7
+ import _ "./bug0"
8
+
platform/dbops/binaries/go/go/test/fixedbugs/bug133.dir/bug0.go ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package bug0
6
+
7
+ type T struct { i int }
platform/dbops/binaries/go/go/test/fixedbugs/bug133.dir/bug1.go ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package bug1
6
+
7
+ import "./bug0"
8
+
9
+ type T struct { t bug0.T }
platform/dbops/binaries/go/go/test/fixedbugs/bug133.dir/bug2.go ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package bug2
6
+
7
+ import _ "./bug1"
8
+ import "./bug0"
9
+
10
+ type T2 struct { t bug0.T }
11
+
12
+ func fn(p *T2) int {
13
+ // This reference should be invalid, because bug0.T.i is local
14
+ // to package bug0 and should not be visible in package bug1.
15
+ return p.t.i; // ERROR "field|undef"
16
+ }
platform/dbops/binaries/go/go/test/fixedbugs/bug160.dir/x.go ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package x
6
+
7
+ const Zero = 0.0
8
+ const Ten = 10.0
platform/dbops/binaries/go/go/test/fixedbugs/bug160.dir/y.go ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package main
6
+
7
+ import "os"
8
+ import "./x"
9
+
10
+ func main() {
11
+ if x.Zero != 0 {
12
+ println("x.Zero = ", x.Zero);
13
+ os.Exit(1);
14
+ }
15
+ if x.Ten != 10 {
16
+ println("x.Ten = ", x.Ten);
17
+ os.Exit(1);
18
+ }
19
+ }
platform/dbops/binaries/go/go/test/fixedbugs/bug191.dir/a.go ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package a
6
+
7
+ var A int
8
+
9
+ func init() {
10
+ A = 1
11
+ }
12
+
13
+ type T int;
14
+
platform/dbops/binaries/go/go/test/fixedbugs/bug191.dir/b.go ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package b
6
+
7
+ var B int
8
+
9
+ func init() {
10
+ B = 2
11
+ }
12
+
13
+ type V int;
platform/dbops/binaries/go/go/test/fixedbugs/bug191.dir/main.go ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package main
6
+
7
+ import . "./a"
8
+ import . "./b"
9
+
10
+ var _ T
11
+ var _ V
12
+
13
+ func main() {
14
+ if A != 1 || B != 2 {
15
+ panic("wrong vars")
16
+ }
17
+ }
platform/dbops/binaries/go/go/test/fixedbugs/bug222.dir/chanbug.go ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file
4
+
5
+ package chanbug
6
+ var C chan<- (chan int)
7
+ var D chan<- func()
8
+ var E func() chan int
9
+ var F func() (func())
platform/dbops/binaries/go/go/test/fixedbugs/bug222.dir/chanbug2.go ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ // Copyright 2009 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file
4
+
5
+ package Bar
6
+
7
+ import _ "./chanbug"
platform/dbops/binaries/go/go/test/fixedbugs/bug248.dir/bug0.go ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2010 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file
4
+
5
+ package p
6
+
7
+ type T struct {
8
+ X, Y int
9
+ }
10
+
11
+ type I interface {
12
+ M(T)
13
+ }
platform/dbops/binaries/go/go/test/fixedbugs/bug248.dir/bug1.go ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2010 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file
4
+
5
+ package q
6
+
7
+ type T struct {
8
+ X, Y int
9
+ }
10
+
11
+ type I interface {
12
+ M(T)
13
+ }
platform/dbops/binaries/go/go/test/fixedbugs/bug248.dir/bug2.go ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2010 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file
4
+
5
+ package s
6
+
7
+ import (
8
+ p0 "./bug0"
9
+ p1 "./bug1"
10
+ )
11
+
12
+ // both p0.T and p1.T are struct { X, Y int }.
13
+
14
+ var v0 p0.T
15
+ var v1 p1.T
16
+
17
+ // interfaces involving the two
18
+
19
+ type I0 interface {
20
+ M(p0.T)
21
+ }
22
+
23
+ type I1 interface {
24
+ M(p1.T)
25
+ }
26
+
27
+ // t0 satisfies I0 and p0.I
28
+ type t0 int
29
+
30
+ func (t0) M(p0.T) {}
31
+
32
+ // t1 satisfies I1 and p1.I
33
+ type t1 float64
34
+
35
+ func (t1) M(p1.T) {}
36
+
37
+ // check static interface assignments
38
+ var i0 I0 = t0(0) // ok
39
+ var i1 I1 = t1(0) // ok
40
+
41
+ var i2 I0 = t1(0) // ERROR "does not implement|incompatible"
42
+ var i3 I1 = t0(0) // ERROR "does not implement|incompatible"
43
+
44
+ var p0i p0.I = t0(0) // ok
45
+ var p1i p1.I = t1(0) // ok
46
+
47
+ var p0i1 p0.I = t1(0) // ERROR "does not implement|incompatible"
48
+ var p0i2 p1.I = t0(0) // ERROR "does not implement|incompatible"
49
+
50
+ func foobar() {
51
+ // check that cannot assign one to the other,
52
+ // but can convert.
53
+ v0 = v1 // ERROR "assign|cannot use"
54
+ v1 = v0 // ERROR "assign|cannot use"
55
+
56
+ v0 = p0.T(v1)
57
+ v1 = p1.T(v0)
58
+
59
+ i0 = i1 // ERROR "cannot use|incompatible"
60
+ i1 = i0 // ERROR "cannot use|incompatible"
61
+ p0i = i1 // ERROR "cannot use|incompatible"
62
+ p1i = i0 // ERROR "cannot use|incompatible"
63
+ i0 = p1i // ERROR "cannot use|incompatible"
64
+ i1 = p0i // ERROR "cannot use|incompatible"
65
+ p0i = p1i // ERROR "cannot use|incompatible"
66
+ p1i = p0i // ERROR "cannot use|incompatible"
67
+
68
+ i0 = p0i
69
+ p0i = i0
70
+
71
+ i1 = p1i
72
+ p1i = i1
73
+ }
platform/dbops/binaries/go/go/test/fixedbugs/bug248.dir/bug3.go ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2010 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file
4
+
5
+ package main
6
+
7
+ import (
8
+ p0 "./bug0"
9
+ p1 "./bug1"
10
+
11
+ "reflect"
12
+ "strings"
13
+ )
14
+
15
+ var v0 p0.T
16
+ var v1 p1.T
17
+
18
+ type I0 interface {
19
+ M(p0.T)
20
+ }
21
+
22
+ type I1 interface {
23
+ M(p1.T)
24
+ }
25
+
26
+ type t0 int
27
+
28
+ func (t0) M(p0.T) {}
29
+
30
+ type t1 float64
31
+
32
+ func (t1) M(p1.T) {}
33
+
34
+ var i0 I0 = t0(0) // ok
35
+ var i1 I1 = t1(0) // ok
36
+
37
+ var p0i p0.I = t0(0) // ok
38
+ var p1i p1.I = t1(0) // ok
39
+
40
+ func main() {
41
+ // check that reflect paths are correct,
42
+ // meaning that reflect data for v0, v1 didn't get confused.
43
+
44
+ // path is full (rooted) path name. check suffix for gc, prefix for gccgo
45
+ if s := reflect.TypeOf(v0).PkgPath(); !strings.HasSuffix(s, "/bug0") && !strings.HasPrefix(s, "bug0") {
46
+ println("bad v0 path", len(s), s)
47
+ panic("fail")
48
+ }
49
+ if s := reflect.TypeOf(v1).PkgPath(); !strings.HasSuffix(s, "/bug1") && !strings.HasPrefix(s, "bug1") {
50
+ println("bad v1 path", s)
51
+ panic("fail")
52
+ }
53
+
54
+ // check that dynamic interface check doesn't get confused
55
+ var i interface{} = t0(0)
56
+ if _, ok := i.(I1); ok {
57
+ println("used t0 as i1")
58
+ panic("fail")
59
+ }
60
+ if _, ok := i.(p1.I); ok {
61
+ println("used t0 as p1.I")
62
+ panic("fail")
63
+ }
64
+
65
+ i = t1(1)
66
+ if _, ok := i.(I0); ok {
67
+ println("used t1 as i0")
68
+ panic("fail")
69
+ }
70
+ if _, ok := i.(p0.I); ok {
71
+ println("used t1 as p0.I")
72
+ panic("fail")
73
+ }
74
+
75
+ // check that type switch works.
76
+ // the worry is that if p0.T and p1.T have the same hash,
77
+ // the binary search will handle one of them incorrectly.
78
+ for j := 0; j < 3; j++ {
79
+ switch j {
80
+ case 0:
81
+ i = p0.T{}
82
+ case 1:
83
+ i = p1.T{}
84
+ case 2:
85
+ i = 3.14
86
+ }
87
+ switch i.(type) {
88
+ case p0.T:
89
+ if j != 0 {
90
+ println("type switch p0.T")
91
+ panic("fail")
92
+ }
93
+ case p1.T:
94
+ if j != 1 {
95
+ println("type switch p1.T")
96
+ panic("fail")
97
+ }
98
+ default:
99
+ if j != 2 {
100
+ println("type switch default", j)
101
+ panic("fail")
102
+ }
103
+ }
104
+ }
105
+ }
platform/dbops/binaries/go/go/test/fixedbugs/bug282.dir/p1.go ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2010 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package p1
6
+
7
+ type T struct {
8
+ f func() "x"
9
+ }
10
+
platform/dbops/binaries/go/go/test/fixedbugs/bug282.dir/p2.go ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2010 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package p2
6
+
7
+ import _ "./p1"
8
+
platform/dbops/binaries/go/go/test/fixedbugs/bug306.dir/p1.go ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2010 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package p1
6
+
7
+ type T <-chan int
8
+ var x = make(chan T)
9
+
platform/dbops/binaries/go/go/test/fixedbugs/bug306.dir/p2.go ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2010 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package p2
6
+
7
+ import _ "./p1"
8
+
platform/dbops/binaries/go/go/test/fixedbugs/bug313.dir/a.go ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2010 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package main
6
+
7
+ import "fmt"
8
+
9
+ func a() {
10
+ fmt.DoesNotExist() // ERROR "undefined"
11
+ }
platform/dbops/binaries/go/go/test/fixedbugs/bug313.dir/b.go ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2010 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package main
6
+
7
+ import . "fmt"
8
+
9
+ func b() {
10
+ Println()
11
+ }
platform/dbops/binaries/go/go/test/fixedbugs/bug322.dir/lib.go ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2011 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package lib
6
+
7
+ type T struct {
8
+ x int // non-exported field
9
+ }
10
+
11
+ func (t T) M() {
12
+ }
13
+
14
+ func (t *T) PM() {
15
+ }
platform/dbops/binaries/go/go/test/fixedbugs/bug322.dir/main.go ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2011 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package main
6
+
7
+ import "./lib"
8
+
9
+ type I interface {
10
+ M()
11
+ }
12
+
13
+ type PI interface {
14
+ PM()
15
+ }
16
+
17
+ func main() {
18
+ var t lib.T
19
+ t.M()
20
+ t.PM()
21
+
22
+ // This is still an error.
23
+ // var i1 I = t
24
+ // i1.M()
25
+
26
+ // This combination is illegal because
27
+ // PM requires a pointer receiver.
28
+ // var pi1 PI = t
29
+ // pi1.PM()
30
+
31
+ var pt = &t
32
+ pt.M()
33
+ pt.PM()
34
+
35
+ var i2 I = pt
36
+ i2.M()
37
+
38
+ var pi2 PI = pt
39
+ pi2.PM()
40
+ }
platform/dbops/binaries/go/go/test/fixedbugs/bug324.dir/p.go ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright 2011 The Go Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package p
6
+
7
+ type Exported interface {
8
+ private()
9
+ }
10
+
11
+ type Implementation struct{}
12
+
13
+ func (p *Implementation) private() { println("p.Implementation.private()") }
14
+
15
+ var X = new(Implementation)