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
9a65381b
Commit
9a65381b
authored
Feb 02, 2010
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for gccgo, which uses a package prefix.
R=rsc CC=golang-dev
https://golang.org/cl/198046
parent
001d9917
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
bug2.go
test/fixedbugs/bug248.dir/bug2.go
+3
-3
No files found.
test/fixedbugs/bug248.dir/bug2.go
View file @
9a65381b
...
...
@@ -37,11 +37,11 @@ func main() {
// check that reflect paths are correct,
// meaning that reflect data for v0, v1 didn't get confused.
// path is full (rooted) path name. check suffix
only.
if
s
:=
reflect
.
Typeof
(
v0
)
.
PkgPath
();
!
strings
.
HasSuffix
(
s
,
"/bug0"
)
{
// path is full (rooted) path name. check suffix
for gc, prefix for gccgo
if
s
:=
reflect
.
Typeof
(
v0
)
.
PkgPath
();
!
strings
.
HasSuffix
(
s
,
"/bug0"
)
&&
!
strings
.
HasPrefix
(
s
,
"bug0"
)
{
panicln
(
"bad v0 path"
,
len
(
s
),
s
)
}
if
s
:=
reflect
.
Typeof
(
v1
)
.
PkgPath
();
!
strings
.
HasSuffix
(
s
,
"/bug1"
)
{
if
s
:=
reflect
.
Typeof
(
v1
)
.
PkgPath
();
!
strings
.
HasSuffix
(
s
,
"/bug1"
)
&&
!
strings
.
HasPrefix
(
s
,
"bug1"
)
{
panicln
(
"bad v1 path"
,
s
)
}
...
...
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