test/fixedbugs/issue23489.go
raw| 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 | |
| 9 | package main |
| 10 | |
| 11 | type T struct{} |
| 12 | |
| 13 | func (*T) Foo() {} |
| 14 | |
| 15 | type P = *T |
| 16 | |
| 17 | func main() { |
| 18 | var p P |
| 19 | p.Foo() |
| 20 | } |