1// compile 2 3// Copyright 2015 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// Gccgo used to give an error: 8// <built-in>: error: redefinition of ‘s$F$hash’ 9// <built-in>: note: previous definition of ‘s$F$hash’ was here 10// <built-in>: error: redefinition of ‘s$F$equal’ 11// <built-in>: note: previous definition of ‘s$F$equal’ was here 12 13package p 14 15type T1 int 16 17func (t T1) F() { 18 type s struct { 19 f string 20 } 21} 22 23type T2 int 24 25func (t T2) F() { 26 type s struct { 27 f string 28 } 29} 30