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
e0059ae8
Commit
e0059ae8
authored
Jan 19, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gc: bug243
Fixes #481. R=ken2 CC=golang-dev
https://golang.org/cl/186213
parent
5a5799f6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletion
+31
-1
dcl.c
src/cmd/gc/dcl.c
+3
-1
bug243.go
test/fixedbugs/bug243.go
+28
-0
No files found.
src/cmd/gc/dcl.c
View file @
e0059ae8
...
...
@@ -325,8 +325,10 @@ variter(NodeList *vl, Node *t, NodeList *el)
declare
(
v
,
dclcontext
);
v
->
ntype
=
t
;
v
->
defn
=
as2
;
if
(
funcdepth
>
0
)
init
=
list
(
init
,
nod
(
ODCL
,
v
,
N
));
}
return
list
1
(
as2
);
return
list
(
init
,
as2
);
}
for
(;
vl
;
vl
=
vl
->
next
)
{
...
...
test/fixedbugs/bug243.go
0 → 100644
View file @
e0059ae8
// $G $D/$F.go && $L $F.$A && ./$A.out
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
main
import
(
"fmt"
"net"
"os"
)
func
main
()
{
os
.
Stdout
.
Close
()
var
listen
,
_
=
net
.
Listen
(
"tcp"
,
":0"
)
go
func
()
{
for
{
var
conn
,
_
=
listen
.
Accept
()
fmt
.
Println
(
"[SERVER] "
,
conn
)
}
}()
var
conn
,
_
=
net
.
Dial
(
"tcp"
,
""
,
listen
.
Addr
()
.
String
())
fmt
.
Println
(
"[CLIENT] "
,
conn
)
}
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