mirror of
https://github.com/golang/go
synced 2024-11-05 18:36:10 -07:00
6363fc5aa6
CL 4313064 fixed its test case but did not address a general enough problem: type T1 struct { F *T2 } type T2 T1 type T3 T2 could still end up copying the definition of T1 for T2 before T1 was done being evaluated, or T3 before T2 was done. In order to propagate the updates correctly, record a copy of an incomplete type for re-execution once the type is completed. Roll back CL 4313064. Fixes #3709. R=ken2 CC=golang-dev, lstoakes https://golang.org/cl/6301059
18 lines
386 B
Go
18 lines
386 B
Go
// compile
|
|
|
|
// Copyright 2012 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.
|
|
|
|
// Was failing to compile with 'invalid receiver' due to
|
|
// incomplete type definition evaluation. Issue 3709.
|
|
|
|
package p
|
|
|
|
type T1 struct { F *T2 }
|
|
type T2 T1
|
|
|
|
type T3 T2
|
|
func (*T3) M() // was invalid receiver
|
|
|