mirror of https://github.com/golang/go.git
gc: fix spurious typecheck loop in &composite literal
Fixes #2538. R=ken2 CC=golang-dev https://golang.org/cl/5449114
This commit is contained in:
parent
1278c6c055
commit
5e98505ba7
|
|
@ -2198,6 +2198,7 @@ typecheckcomplit(Node **np)
|
|||
n->typecheck = 1;
|
||||
n->type = n->left->type;
|
||||
n->left->type = t;
|
||||
n->left->typecheck = 1;
|
||||
}
|
||||
|
||||
*np = n;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
// $G $D/$F.go
|
||||
|
||||
// Copyright 2011 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.
|
||||
|
||||
// Used to cause a typechecking loop error.
|
||||
|
||||
package pkg
|
||||
type T map[int]string
|
||||
var q = &T{}
|
||||
Loading…
Reference in New Issue