Source file test/typeparam/issue47631.go

     1  // compile
     2  
     3  // Copyright 2021 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  package p
     8  
     9  func g[T any]() {
    10  	type U []T
    11  	type V []int
    12  }
    13  
    14  type S[T any] struct {
    15  }
    16  
    17  func (s S[T]) m() {
    18  	type U []T
    19  	type V []int
    20  }
    21  
    22  func f() {
    23  	type U []int
    24  }
    25  
    26  type X struct {
    27  }
    28  
    29  func (x X) m() {
    30  	type U []int
    31  }
    32  

View as plain text