mirror of
https://github.com/golang/go
synced 2024-11-21 18:44:45 -07:00
gc: bug245
Fixes #529. R=ken2 CC=golang-dev https://golang.org/cl/186215
This commit is contained in:
parent
8e996304f3
commit
ff6e310b00
@ -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
|
||||
|
@ -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;
|
||||
|
16
test/fixedbugs/bug245.go
Normal file
16
test/fixedbugs/bug245.go
Normal file
@ -0,0 +1,16 @@
|
||||
// $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
|
Loading…
Reference in New Issue
Block a user