summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2008-06-18 13:53:51 -0700
committerRob Pike <r@golang.org>2008-06-18 13:53:51 -0700
commite2f9af1eb3fb4cce415b5e7d93331fb323c53ee7 (patch)
treedc6d48354ffd9900daaa47be55edee67a72f7d9e /test
parent7a46d77f1317a4c2aad4e5f6ced77db457e7ffcb (diff)
downloadgolang-e2f9af1eb3fb4cce415b5e7d93331fb323c53ee7.tar.gz
a couple of bugs around nil are fixed
SVN=123423
Diffstat (limited to 'test')
-rw-r--r--test/fixedbugs/bug045.go (renamed from test/bugs/bug045.go)4
-rw-r--r--test/golden.out8
-rw-r--r--test/nil.go6
3 files changed, 7 insertions, 11 deletions
diff --git a/test/bugs/bug045.go b/test/fixedbugs/bug045.go
index d6ec0f1e4..08b6990ae 100644
--- a/test/bugs/bug045.go
+++ b/test/fixedbugs/bug045.go
@@ -11,9 +11,9 @@ type T struct {
}
func main() {
- var ta *[]T;
+ var ta *[]*T;
- ta = new([1]T);
+ ta = new([1]*T);
ta[0] = nil;
}
/*
diff --git a/test/golden.out b/test/golden.out
index 1179f0d7e..67fb83f57 100644
--- a/test/golden.out
+++ b/test/golden.out
@@ -26,8 +26,6 @@ hello, world
=========== ./literal.go
=========== ./nil.go
-nil.go:30: illegal conversion of constant to <T>{}
-BUG: known to fail incorrectly
=========== ./sieve.go
sieve.go:8: fatal error: walktype: switch 1 unknown op SEND l(151)
@@ -210,10 +208,6 @@ BUG: compilation should succeed
bugs/bug044.go:23: error in shape across assignment
BUG: compilation should succeed
-=========== bugs/bug045.go
-bugs/bug045.go:13: illegal conversion of constant to <T>{}
-BUG: known to fail incorrectly
-
=========== bugs/bug046.go
bugs/bug046.go:7: illegal <this> pointer
BUG: known to fail incorrectly
@@ -304,3 +298,5 @@ BUG: known to fail incorrectly
=========== fixedbugs/bug028.go
=========== fixedbugs/bug031.go
+
+=========== fixedbugs/bug045.go
diff --git a/test/nil.go b/test/nil.go
index 3062ea372..d0cb65dcb 100644
--- a/test/nil.go
+++ b/test/nil.go
@@ -21,7 +21,7 @@ func main() {
var c *chan int;
var t *T;
var in IN;
- var ta *[]T;
+ var ta *[]IN;
i = nil;
f = nil;
@@ -30,6 +30,6 @@ func main() {
c = nil;
t = nil;
i = nil;
- ta = new([1]T);
- ta[0] = nil; //BUG (see bugs/bug045.go)
+ ta = new([1]IN);
+ ta[0] = nil;
}