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
7dd62cb3
Commit
7dd62cb3
authored
Dec 10, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2 minor bugs
R=r OCL=20906 CL=20906
parent
57bd0da3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
dcl.c
src/cmd/gc/dcl.c
+5
-6
go.y
src/cmd/gc/go.y
+1
-0
No files found.
src/cmd/gc/dcl.c
View file @
7dd62cb3
...
...
@@ -701,13 +701,12 @@ testdclstack(void)
static
void
redeclare
(
char
*
str
,
Sym
*
s
)
{
if
(
s
->
block
!=
block
)
{
s
->
block
=
block
;
s
->
lastlineno
=
lineno
;
return
;
if
(
s
->
block
==
block
)
{
yyerror
(
"%s %S redeclared in this block"
,
str
,
s
);
print
(
" previous declaration at %L
\n
"
,
s
->
lastlineno
);
}
yyerror
(
"%s %S redeclared in this block %d"
,
str
,
s
,
block
)
;
print
(
" previous declaration at %L
\n
"
,
s
->
lastlineno
)
;
s
->
block
=
block
;
s
->
lastlineno
=
lineno
;
}
void
...
...
src/cmd/gc/go.y
View file @
7dd62cb3
...
...
@@ -1087,6 +1087,7 @@ nametype:
LATYPE
{
if
($
1
->
otype
!= T && $1->otype->etype == TANY)
if
(
strcmp
(
package
,
"PACKAGE"
)
!= 0)
yyerror
(
"the any type is restricted"
);
$$
=
oldtype
($
1
);
}
...
...
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