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
06869eed
Commit
06869eed
authored
Jan 16, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disallow other package's names in struct field dot.
R=ken OCL=22996 CL=22996
parent
03c40f51
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
0 deletions
+4
-0
dcl.c
src/cmd/gc/dcl.c
+2
-0
go.h
src/cmd/gc/go.h
+1
-0
go.y
src/cmd/gc/go.y
+1
-0
No files found.
src/cmd/gc/dcl.c
View file @
06869eed
...
@@ -512,6 +512,8 @@ loop:
...
@@ -512,6 +512,8 @@ loop:
f
->
nname
=
n
->
left
;
f
->
nname
=
n
->
left
;
f
->
embedded
=
n
->
embedded
;
f
->
embedded
=
n
->
embedded
;
f
->
sym
=
f
->
nname
->
sym
;
f
->
sym
=
f
->
nname
->
sym
;
if
(
pkgimportname
!=
S
&&
!
exportname
(
f
->
sym
->
name
))
f
->
sym
=
pkglookup
(
f
->
sym
->
name
,
pkgimportname
->
name
);
}
}
*
t
=
f
;
*
t
=
f
;
...
...
src/cmd/gc/go.h
View file @
06869eed
...
@@ -741,6 +741,7 @@ void constiter(Node*, Type*, Node*);
...
@@ -741,6 +741,7 @@ void constiter(Node*, Type*, Node*);
*/
*/
void
renamepkg
(
Node
*
);
void
renamepkg
(
Node
*
);
void
autoexport
(
Sym
*
);
void
autoexport
(
Sym
*
);
int
exportname
(
char
*
);
void
exportsym
(
Sym
*
);
void
exportsym
(
Sym
*
);
void
packagesym
(
Sym
*
);
void
packagesym
(
Sym
*
);
void
dumpe
(
Sym
*
);
void
dumpe
(
Sym
*
);
...
...
src/cmd/gc/go.y
View file @
06869eed
...
@@ -160,6 +160,7 @@ import_there:
...
@@ -160,6 +160,7 @@ import_there:
{
{
checkimports
();
checkimports
();
unimportfile
();
unimportfile
();
pkgimportname
=
S
;
}
}
|
LIMPORT
'$'
'$'
hidden_import_list
'$'
'$'
|
LIMPORT
'$'
'$'
hidden_import_list
'$'
'$'
{
{
...
...
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