Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
299874d5
Commit
299874d5
authored
Oct 16, 2014
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler: Method names must be non-blank.
Fixes issue 8078. From-SVN: r216347
parent
aa194848
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
16 deletions
+4
-16
gcc/go/gofrontend/parse.cc
+2
-0
gcc/testsuite/go.test/test/interface/explicit.go
+2
-2
gcc/testsuite/go.test/test/interface/fail.go
+0
-14
No files found.
gcc/go/gofrontend/parse.cc
View file @
299874d5
...
...
@@ -1253,6 +1253,8 @@ Parse::method_spec(Typed_identifier_list* methods)
if
(
this
->
advance_token
()
->
is_op
(
OPERATOR_LPAREN
))
{
// This is a MethodName.
if
(
name
==
"_"
)
error_at
(
this
->
location
(),
"methods must have a unique non-blank name"
);
name
=
this
->
gogo_
->
pack_hidden_name
(
name
,
is_exported
);
Type
*
type
=
this
->
signature
(
NULL
,
location
);
if
(
type
==
NULL
)
...
...
gcc/testsuite/go.test/test/interface/explicit.go
View file @
299874d5
...
...
@@ -83,12 +83,12 @@ var m4 = M(jj) // ERROR "invalid|wrong type for M method"
type
B1
interface
{
_
()
_
()
// ERROR "methods must have a unique non-blank name"
}
type
B2
interface
{
M
()
_
()
_
()
// ERROR "methods must have a unique non-blank name"
}
type
T2
struct
{}
...
...
gcc/testsuite/go.test/test/interface/fail.go
View file @
299874d5
...
...
@@ -14,7 +14,6 @@ type I interface {
func
main
()
{
shouldPanic
(
p1
)
shouldPanic
(
p2
)
}
func
p1
()
{
...
...
@@ -30,19 +29,6 @@ type S struct{}
func
(
s
*
S
)
_
()
{}
type
B
interface
{
_
()
}
func
p2
()
{
var
s
*
S
var
b
B
var
e
interface
{}
e
=
s
b
=
e
.
(
B
)
_
=
b
}
func
shouldPanic
(
f
func
())
{
defer
func
()
{
if
recover
()
==
nil
{
...
...
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