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
524fb81c
Commit
524fb81c
authored
Jan 12, 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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
fmt.c
src/cmd/gc/fmt.c
+4
-2
one.go
test/fixedbugs/bug392.dir/one.go
+3
-0
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