Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
524fb81c
Commit
524fb81c
authored
Jan 11, 2012
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gc: inlining bug
R=lvd CC=golang-dev
https://golang.org/cl/5533078
parent
b1d6fa51
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
src/cmd/gc/fmt.c
src/cmd/gc/fmt.c
+4
-2
test/fixedbugs/bug392.dir/one.go
test/fixedbugs/bug392.dir/one.go
+3
-0
test/fixedbugs/bug392.dir/two.go
test/fixedbugs/bug392.dir/two.go
+1
-1
No files found.
src/cmd/gc/fmt.c
View file @
524fb81c
...
...
@@ -669,8 +669,10 @@ typefmt(Fmt *fp, Type *t)
case
0
:
break
;
case
1
:
fmtprint
(
fp
,
" %T"
,
getoutargx
(
t
)
->
type
->
type
);
// struct->field->field's type
break
;
if
(
fmtmode
!=
FExp
)
{
fmtprint
(
fp
,
" %T"
,
getoutargx
(
t
)
->
type
->
type
);
// struct->field->field's type
break
;
}
default:
fmtprint
(
fp
,
" %T"
,
getoutargx
(
t
));
break
;
...
...
test/fixedbugs/bug392.dir/one.go
View file @
524fb81c
...
...
@@ -14,6 +14,9 @@ func F1(T *T) bool { return T == nil }
// Issue 2682.
func
F2
(
c
chan
int
)
bool
{
return
c
==
(
<-
chan
int
)(
nil
)
}
// Use of single named return value.
func
F3
()
(
ret
[]
int
)
{
return
append
(
ret
,
1
)
}
// Call of inlined method with blank receiver.
func
(
_
*
T
)
M
()
int
{
return
1
}
func
(
t
*
T
)
MM
()
int
{
return
t
.
M
()
}
test/fixedbugs/bug392.dir/two.go
View file @
524fb81c
...
...
@@ -12,9 +12,9 @@ import "./one"
func
use
()
{
one
.
F1
(
nil
)
one
.
F2
(
nil
)
one
.
F3
()
var
t
*
one
.
T
t
.
M
()
t
.
MM
()
}
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