1// run 2 3// Copyright 2017 The Go Authors. All rights reserved. 4// Use of this source code is governed by a BSD-style 5// license that can be found in the LICENSE file. 6 7// Caused gccgo to issue a spurious compilation error. 8 9package main 10 11type T struct{} 12 13func (*T) Foo() {} 14 15type P = *T 16 17func main() { 18 var p P 19 p.Foo() 20} 21