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
bd7c6263
Commit
bd7c6263
authored
May 29, 2012
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exp/types: properly read dotted identifiers
Fixes #3682. R=rsc CC=golang-dev
https://golang.org/cl/6256067
parent
12b2022a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
gcimporter.go
src/pkg/exp/types/gcimporter.go
+1
-1
gcimporter_test.go
src/pkg/exp/types/gcimporter_test.go
+0
-7
exports.go
src/pkg/exp/types/testdata/exports.go
+5
-0
No files found.
src/pkg/exp/types/gcimporter.go
View file @
bd7c6263
...
...
@@ -182,7 +182,7 @@ func (p *gcParser) init(filename, id string, src io.Reader, imports map[string]*
func
(
p
*
gcParser
)
next
()
{
p
.
tok
=
p
.
scanner
.
Scan
()
switch
p
.
tok
{
case
scanner
.
Ident
,
scanner
.
Int
,
scanner
.
String
:
case
scanner
.
Ident
,
scanner
.
Int
,
scanner
.
String
,
'·'
:
p
.
lit
=
p
.
scanner
.
TokenText
()
default
:
p
.
lit
=
""
...
...
src/pkg/exp/types/gcimporter_test.go
View file @
bd7c6263
...
...
@@ -92,13 +92,6 @@ func testDir(t *testing.T, dir string, endTime time.Time) (nimports int) {
}
func
TestGcImport
(
t
*
testing
.
T
)
{
// Dies trying to read crypto/md5, which contains
// const init1 = 0x...
// The importer believes init1 should be a function for some reason.
// golang.org/issue/3682.
t
.
Logf
(
"broken; skipping"
)
return
// On cross-compile builds, the path will not exist.
// Need to use GOHOSTOS, which is not available.
if
_
,
err
:=
os
.
Stat
(
gcPath
);
err
!=
nil
{
...
...
src/pkg/exp/types/testdata/exports.go
View file @
bd7c6263
...
...
@@ -11,6 +11,11 @@ import (
"go/ast"
)
// Issue 3682: Correctly read dotted identifiers from export data.
const
init1
=
0
func
init
()
{}
const
(
C0
int
=
0
C1
=
3.14159265
...
...
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