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
66beb2fd
Commit
66beb2fd
authored
Aug 12, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug187 not to crash
TBR=austin DELTA=9 (4 added, 4 deleted, 1 changed) OCL=33115 CL=33115
parent
a9261020
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
bug187.go
test/bugs/bug187.go
+5
-1
golden.out
test/golden.out
+0
-4
No files found.
test/bugs/bug187.go
View file @
66beb2fd
...
...
@@ -6,13 +6,17 @@
package
main
import
"os"
func
main
()
{
// This bug doesn't arise with [...]int, or []interface{} or [3]interface{}.
a
:=
[
...
]
interface
{}
{
1
,
2
,
3
};
n
:=
0
;
bug
:=
false
;
for
_
,
v
:=
range
a
{
if
v
.
(
int
)
!=
n
{
panicln
(
"BUG:"
,
n
,
v
.
(
int
));
println
(
"BUG:"
,
n
,
v
.
(
int
));
os
.
Exit
(
0
);
}
n
++
;
}
...
...
test/golden.out
View file @
66beb2fd
...
...
@@ -156,7 +156,3 @@ BUG: errchk: command succeeded unexpectedly
=========== bugs/bug187.go
BUG: 0 1
SIGSEGV: segmentation violation
Faulting address: 0x40a1f0
PC=0x40a1f0
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