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
340918a8
Commit
340918a8
authored
Jul 29, 2013
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/parser: selectors may be method expressions
R=adonovan CC=golang-dev
https://golang.org/cl/12062043
parent
46437f00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
parser.go
src/pkg/go/parser/parser.go
+1
-1
short_test.go
src/pkg/go/parser/short_test.go
+1
-0
No files found.
src/pkg/go/parser/parser.go
View file @
340918a8
...
...
@@ -1408,7 +1408,7 @@ L:
}
switch
p
.
tok
{
case
token
.
IDENT
:
x
=
p
.
parseSelector
(
p
.
checkExpr
(
x
))
x
=
p
.
parseSelector
(
p
.
checkExpr
OrType
(
x
))
case
token
.
LPAREN
:
x
=
p
.
parseTypeAssertion
(
p
.
checkExpr
(
x
))
default
:
...
...
src/pkg/go/parser/short_test.go
View file @
340918a8
...
...
@@ -34,6 +34,7 @@ var valids = []string{
`package p; func f() { switch ; {} };`
,
`package p; func f() { for _ = range "foo" + "bar" {} };`
,
`package p; func f() { var s []int; g(s[:], s[i:], s[:j], s[i:j], s[i:j:k], s[:j:k]) };`
,
`package p; var ( _ = (struct {*T}).m; _ = (interface {T}).m )`
,
}
func
TestValid
(
t
*
testing
.
T
)
{
...
...
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