diff options
Diffstat (limited to 'test/fixedbugs')
| -rw-r--r-- | test/fixedbugs/bug027.go | 2 | ||||
| -rw-r--r-- | test/fixedbugs/bug045.go | 2 | ||||
| -rw-r--r-- | test/fixedbugs/bug054.go | 2 | ||||
| -rw-r--r-- | test/fixedbugs/bug059.go | 4 | ||||
| -rw-r--r-- | test/fixedbugs/bug119.go | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/test/fixedbugs/bug027.go b/test/fixedbugs/bug027.go index f7b33c04c..2c595cb83 100644 --- a/test/fixedbugs/bug027.go +++ b/test/fixedbugs/bug027.go @@ -11,7 +11,7 @@ type Element interface { type Vector struct { nelem int; - elem *[]Element; + elem []Element; } func New() *Vector { diff --git a/test/fixedbugs/bug045.go b/test/fixedbugs/bug045.go index 08b6990ae..d8a712c6d 100644 --- a/test/fixedbugs/bug045.go +++ b/test/fixedbugs/bug045.go @@ -11,7 +11,7 @@ type T struct { } func main() { - var ta *[]*T; + var ta []*T; ta = new([1]*T); ta[0] = nil; diff --git a/test/fixedbugs/bug054.go b/test/fixedbugs/bug054.go index a91773e22..decf5841d 100644 --- a/test/fixedbugs/bug054.go +++ b/test/fixedbugs/bug054.go @@ -10,7 +10,7 @@ type Element interface { } type Vector struct { - elem *[]Element; + elem []Element; } func (v *Vector) At(i int) Element { diff --git a/test/fixedbugs/bug059.go b/test/fixedbugs/bug059.go index a798b6fcd..5a29ed1f0 100644 --- a/test/fixedbugs/bug059.go +++ b/test/fixedbugs/bug059.go @@ -6,7 +6,7 @@ package main -func P(a *[]string) string { +func P(a []string) string { s := "{"; for i := 0; i < 2; i++ { if i > 0 { @@ -19,7 +19,7 @@ func P(a *[]string) string { } func main() { - m := new(map[string] *[]string); + m := new(map[string] []string); as := new([2]string); as[0] = "0"; as[1] = "1"; diff --git a/test/fixedbugs/bug119.go b/test/fixedbugs/bug119.go index 796937947..e565cffd4 100644 --- a/test/fixedbugs/bug119.go +++ b/test/fixedbugs/bug119.go @@ -6,7 +6,7 @@ package main -func foo(a *[]int) int { +func foo(a []int) int { return (*a)[0] // this seesm to do the wrong thing } |
