Commit 5e98505b authored by Russ Cox's avatar Russ Cox

gc: fix spurious typecheck loop in &composite literal

Fixes #2538.

R=ken2
CC=golang-dev
https://golang.org/cl/5449114
parent 1278c6c0
......@@ -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;
......
// $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{}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment