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
0be746d5
Commit
0be746d5
authored
Oct 24, 2008
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix method function type compare bug
R=ken OCL=17815 CL=17815
parent
63ed2b71
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
dcl.c
src/cmd/gc/dcl.c
+5
-2
subr.c
src/cmd/gc/subr.c
+1
-1
No files found.
src/cmd/gc/dcl.c
View file @
0be746d5
...
@@ -279,8 +279,10 @@ addmethod(Node *n, Type *t, int local)
...
@@ -279,8 +279,10 @@ addmethod(Node *n, Type *t, int local)
d
=
f
;
d
=
f
;
continue
;
continue
;
}
}
if
(
!
eqtype
(
t
,
f
->
type
,
0
))
if
(
!
eqtype
(
t
,
f
->
type
,
0
))
{
yyerror
(
"method redeclared: %S of type %S"
,
sf
,
st
);
yyerror
(
"method redeclared: %S of type %S"
,
sf
,
st
);
print
(
"
\t
%T
\n\t
%T
\n
"
,
f
->
type
,
t
);
}
return
;
return
;
}
}
...
@@ -340,7 +342,8 @@ funchdr(Node *n)
...
@@ -340,7 +342,8 @@ funchdr(Node *n)
if
(
!
eqargs
(
n
->
type
,
on
->
type
))
if
(
!
eqargs
(
n
->
type
,
on
->
type
))
yyerror
(
"forward declarations not the same: %S"
,
s
);
yyerror
(
"forward declarations not the same: %S"
,
s
);
}
else
{
}
else
{
yyerror
(
"redeclare of function: %S"
,
s
);
yyerror
(
"function redeclared: %S"
,
s
);
print
(
"
\t
%T
\n\t
%T
\n
"
,
on
->
type
,
n
->
type
);
on
=
N
;
on
=
N
;
}
}
}
}
...
...
src/cmd/gc/subr.c
View file @
0be746d5
...
@@ -1773,7 +1773,7 @@ eqtype(Type *t1, Type *t2, int d)
...
@@ -1773,7 +1773,7 @@ eqtype(Type *t1, Type *t2, int d)
if
(
t1
->
etype
!=
TSTRUCT
||
t2
->
etype
!=
TSTRUCT
)
if
(
t1
->
etype
!=
TSTRUCT
||
t2
->
etype
!=
TSTRUCT
)
return
0
;
return
0
;
if
(
!
eqtype
(
t1
->
type
,
t2
->
type
,
0
))
if
(
!
eqtype
(
t1
,
t2
,
0
))
return
0
;
return
0
;
t1
=
t1
->
down
;
t1
=
t1
->
down
;
...
...
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