Text file src/go/types/testdata/fixedbugs/issue50833.go2

     1  // Copyright 2022 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package p
     6  
     7  type (
     8  	S  struct{ f int }
     9  	PS *S
    10  )
    11  
    12  func a() []*S { return []*S{{f: 1}} }
    13  func b() []PS { return []PS{{f: 1}} }
    14  
    15  func c[P *S]() []P { return []P{{f: 1}} }
    16  func d[P PS]() []P { return []P{{f: 1}} }
    17  

View as plain text