Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
080bd1ec
Commit
080bd1ec
authored
Jun 18, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a couple of bugs around nil are fixed
SVN=123423
parent
727ea928
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
11 deletions
+7
-11
bug045.go
test/fixedbugs/bug045.go
+2
-2
golden.out
test/golden.out
+2
-6
nil.go
test/nil.go
+3
-3
No files found.
test/bugs/bug045.go
→
test/
fixed
bugs/bug045.go
View file @
080bd1ec
...
...
@@ -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
;
}
/*
...
...
test/golden.out
View file @
080bd1ec
...
...
@@ -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
test/nil.go
View file @
080bd1ec
...
...
@@ -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
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment