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
ca2ae27d
Commit
ca2ae27d
authored
Jun 19, 2012
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/ast: multiple "blank" imports are permitted
R=rsc, dsymonds CC=golang-dev
https://golang.org/cl/6303099
parent
9c975440
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
check_test.go
src/pkg/exp/types/check_test.go
+1
-1
test0.src
src/pkg/exp/types/testdata/test0.src
+6
-1
resolve.go
src/pkg/go/ast/resolve.go
+1
-1
No files found.
src/pkg/exp/types/check_test.go
View file @
ca2ae27d
...
...
@@ -203,7 +203,7 @@ func check(t *testing.T, testname string, testfiles []string) {
func
TestCheck
(
t
*
testing
.
T
)
{
// For easy debugging w/o changing the testing code,
// if there is a local test file, only test that file.
const
testfile
=
"test.go"
const
testfile
=
"test
data/test
.go"
if
fi
,
err
:=
os
.
Stat
(
testfile
);
err
==
nil
&&
!
fi
.
IsDir
()
{
fmt
.
Printf
(
"WARNING: Testing only %s (remove it to run all tests)
\n
"
,
testfile
)
check
(
t
,
testfile
,
[]
string
{
testfile
})
...
...
src/pkg/exp/types/testdata/test0.src
View file @
ca2ae27d
...
...
@@ -6,7 +6,12 @@
package
test0
import
"unsafe"
import
(
"unsafe"
//
we
can
have
multiple
blank
imports
(
was
bug
)
_
"math"
_
"net/rpc"
)
const
pi
=
3.1415
...
...
src/pkg/go/ast/resolve.go
View file @
ca2ae27d
...
...
@@ -136,7 +136,7 @@ func NewPackage(fset *token.FileSet, files map[string]*File, importer Importer,
for
_
,
obj
:=
range
pkg
.
Data
.
(
*
Scope
)
.
Objects
{
p
.
declare
(
fileScope
,
pkgScope
,
obj
)
}
}
else
{
}
else
if
name
!=
"_"
{
// declare imported package object in file scope
// (do not re-use pkg in the file scope but create
// a new object instead; the Decl field is different
...
...
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