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
529369e4
Commit
529369e4
authored
Mar 09, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gc: remove duplicate errors, give better error for I.(T)
R=ken2 CC=golang-dev
https://golang.org/cl/370041
parent
e0079585
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
subr.c
src/cmd/gc/subr.c
+16
-7
No files found.
src/cmd/gc/subr.c
View file @
529369e4
...
...
@@ -79,7 +79,7 @@ errcmp(const void *va, const void *vb)
return
a
->
lineno
-
b
->
lineno
;
if
(
a
->
seq
!=
b
->
seq
)
return
a
->
seq
-
b
->
seq
;
return
0
;
return
strcmp
(
a
->
msg
,
b
->
msg
)
;
}
void
...
...
@@ -91,7 +91,8 @@ flusherrors(void)
return
;
qsort
(
err
,
nerr
,
sizeof
err
[
0
],
errcmp
);
for
(
i
=
0
;
i
<
nerr
;
i
++
)
print
(
"%s"
,
err
[
i
].
msg
);
if
(
i
==
0
||
strcmp
(
err
[
i
].
msg
,
err
[
i
-
1
].
msg
)
!=
0
)
print
(
"%s"
,
err
[
i
].
msg
);
nerr
=
0
;
}
...
...
@@ -3082,11 +3083,19 @@ runifacechecks(void)
needexplicit
=
1
;
}
if
(
wrong
)
{
if
(
samename
)
yyerror
(
"%T is not %T
\n\t
missing %S%hhT
\n\t
do have %S%hhT"
,
t
,
iface
,
m
->
sym
,
m
->
type
,
samename
->
sym
,
samename
->
type
);
else
yyerror
(
"%T is not %T
\n\t
missing %S%hhT"
,
t
,
iface
,
m
->
sym
,
m
->
type
);
if
(
p
->
explicit
)
{
if
(
samename
)
yyerror
(
"%T cannot contain %T
\n\t
missing %S%hhT
\n\t
do have %S%hhT"
,
iface
,
t
,
m
->
sym
,
m
->
type
,
samename
->
sym
,
samename
->
type
);
else
yyerror
(
"%T cannot contain %T
\n\t
missing %S%hhT"
,
iface
,
t
,
m
->
sym
,
m
->
type
);
}
else
{
if
(
samename
)
yyerror
(
"%T is not %T
\n\t
missing %S%hhT
\n\t
do have %S%hhT"
,
t
,
iface
,
m
->
sym
,
m
->
type
,
samename
->
sym
,
samename
->
type
);
else
yyerror
(
"%T is not %T
\n\t
missing %S%hhT"
,
t
,
iface
,
m
->
sym
,
m
->
type
);
}
}
else
if
(
!
p
->
explicit
&&
needexplicit
)
{
if
(
m
)
{
...
...
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