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
ff6e310b
Commit
ff6e310b
authored
Jan 19, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gc: bug245
Fixes #529. R=ken2 CC=golang-dev
https://golang.org/cl/186215
parent
8e996304
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
sinit.c
src/cmd/gc/sinit.c
+2
-0
typecheck.c
src/cmd/gc/typecheck.c
+1
-1
bug245.go
test/fixedbugs/bug245.go
+16
-0
No files found.
src/cmd/gc/sinit.c
View file @
ff6e310b
...
...
@@ -322,6 +322,7 @@ slicelit(Node *n, Node *var, NodeList **init)
t
=
shallow
(
n
->
type
);
t
->
bound
=
mpgetfix
(
n
->
right
->
val
.
u
.
xval
);
t
->
width
=
0
;
t
->
sym
=
nil
;
dowidth
(
t
);
// make static initialized array
...
...
@@ -688,6 +689,7 @@ initctxt:
t
=
shallow
(
t
);
t
->
bound
=
mpgetfix
(
n
->
right
->
right
->
val
.
u
.
xval
);
t
->
width
=
0
;
t
->
sym
=
nil
;
dowidth
(
t
);
// make static initialized array
...
...
src/cmd/gc/typecheck.c
View file @
ff6e310b
...
...
@@ -1715,7 +1715,7 @@ typecheckcomplit(Node **np)
memset
(
hash
,
0
,
sizeof
hash
);
l
=
typecheck
(
&
n
->
right
/* sic */
,
Etype
/* TODO | Edotarray */
);
l
=
typecheck
(
&
n
->
right
/* sic */
,
Etype
);
if
((
t
=
l
->
type
)
==
T
)
goto
error
;
nerr
=
nerrors
;
...
...
test/fixedbugs/bug245.go
0 → 100644
View file @
ff6e310b
// $G $D/$F.go || echo BUG: bug245
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
main
type
T
[]
int
func
(
t
T
)
m
()
func
main
()
{
_
=
T
{}
}
// bug245.go:14: fatal error: method mismatch: T for T
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