Source file test/typeparam/issue48198.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  package p
     7  
     8  type Foo[T any] struct {
     9  }
    10  
    11  func (foo Foo[T]) Get()  {
    12  }
    13  
    14  var(
    15  	_ = Foo[byte]{}
    16  	_ = Foo[[]byte]{}
    17  	_ = Foo[map[byte]rune]{}
    18  
    19  	_ = Foo[rune]{}
    20  	_ = Foo[[]rune]{}
    21  	_ = Foo[map[rune]byte]{}
    22  )
    23  

View as plain text