Source file test/fixedbugs/issue8028.go

     1  // compile
     2  
     3  // Copyright 2014 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  // Issue 8028. Used to fail in -race mode with "non-orig name" error.
     8  
     9  package p
    10  
    11  var (
    12  	t2 = T{F, "s1"}
    13  	t1 = T{F, "s2"}
    14  
    15  	tt = [...]T{t1, t2}
    16  )
    17  
    18  type I interface{}
    19  
    20  type T struct {
    21  	F func() I
    22  	S string
    23  }
    24  
    25  type E struct{}
    26  
    27  func F() I { return new(E) }
    28  

View as plain text