Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
e733766d
Commit
e733766d
authored
Dec 03, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gc: minor import grammar bug fixes
Fixes #364. R=ken2
https://golang.org/cl/164092
parent
d984f989
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
8 deletions
+41
-8
src/cmd/gc/go.y
src/cmd/gc/go.y
+27
-8
test/fixedbugs/bug222.dir/chanbug.go
test/fixedbugs/bug222.dir/chanbug.go
+5
-0
test/fixedbugs/bug222.dir/chanbug2.go
test/fixedbugs/bug222.dir/chanbug2.go
+2
-0
test/fixedbugs/bug222.go
test/fixedbugs/bug222.go
+7
-0
No files found.
src/cmd/gc/go.y
View file @
e733766d
...
...
@@ -85,7 +85,9 @@
%
type
<
list
>
hidden_interfacedcl_list
ohidden_interfacedcl_list
%
type
<
list
>
hidden_structdcl_list
ohidden_structdcl_list
%
type
<
type
>
hidden_type
hidden_type1
hidden_type2
hidden_pkgtype
%
type
<
type
>
hidden_type
hidden_type_misc
hidden_pkgtype
%
type
<
type
>
hidden_type_func
hidden_type_non_func
%
type
<
type
>
hidden_type_chan
hidden_type_non_chan
%
left
LOROR
%
left
LANDAND
...
...
@@ -1613,10 +1615,19 @@ hidden_pkgtype:
}
hidden_type:
hidden_type1
| hidden_type2
hidden_type_misc
| hidden_type_chan
| hidden_type_func
hidden_type1:
hidden_type_non_chan:
hidden_type_misc
| hidden_type_func
hidden_type_non_func:
hidden_type_misc
| hidden_type_chan
hidden_type_misc:
hidden_importsym
{
$$ = pkgtype($1);
...
...
@@ -1662,25 +1673,33 @@ hidden_type1:
$$->type = $3;
$$->chan = Crecv;
}
| LCHAN LCOMM hidden_type
1
| LCHAN LCOMM hidden_type
_non_chan
{
$$ = typ(TCHAN);
$$->type = $3;
$$->chan = Csend;
}
| LCHAN LCOMM '
(
' hidden_type_chan '
)
'
{
$$ = typ(TCHAN);
$$->type = $4;
$$->chan = Csend;
}
| LDDD
{
$$ = typ(TDDD);
}
hidden_type
2
:
hidden_type
_chan
:
LCHAN hidden_type
{
$$ = typ(TCHAN);
$$->type = $2;
$$->chan = Cboth;
}
| LFUNC '
(
' ohidden_funarg_list '
)
' ohidden_funres
hidden_type_func:
LFUNC '
(
' ohidden_funarg_list '
)
' ohidden_funres
{
$$ = functype(nil, $3, $5);
}
...
...
@@ -1732,7 +1751,7 @@ hidden_funres:
{
$$ = $2;
}
| hidden_type
1
| hidden_type
_non_func
{
$$ = list1(nod(ODCLFIELD, N, typenod($1)));
}
...
...
test/fixedbugs/bug222.dir/chanbug.go
0 → 100644
View file @
e733766d
package
chanbug
var
C
chan
<-
(
chan
int
)
var
D
chan
<-
func
()
var
E
func
()
chan
int
var
F
func
()
(
func
())
test/fixedbugs/bug222.dir/chanbug2.go
0 → 100644
View file @
e733766d
package
Bar
import
_
"chanbug"
test/fixedbugs/bug222.go
0 → 100644
View file @
e733766d
// $G $D/$F.dir/chanbug.go && $G -I. $D/$F.dir/chanbug2.go
// Copyright 2009 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.
ignored
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