Source file test/typeparam/issue50841.dir/a.go

     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 a
     6  
     7  func Marshal[foobar any]() {
     8  	_ = NewEncoder[foobar]()
     9  }
    10  
    11  func NewEncoder[foobar any]() *Encoder[foobar] {
    12  	return nil
    13  }
    14  
    15  type Encoder[foobar any] struct {
    16  }
    17  
    18  func (e *Encoder[foobar]) EncodeToken(t Token[foobar]) {
    19  
    20  }
    21  
    22  type Token[foobar any] any
    23  

View as plain text