Black Lives Matter. Support the Equal Justice Initiative.

Text file src/go/types/testdata/check/tmp.go2

Documentation: go/types/testdata/check

     1  // Copyright 2020 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  // This file is meant as "dumping ground" for debugging code.
     6  
     7  package p
     8  
     9  // fun test case
    10  type C[P interface{m()}] P
    11  
    12  func (r C[P]) m() { r.m() }
    13  
    14  func f[T interface{m(); n()}](x T) {
    15  	y := C[T](x)
    16  	y.m()
    17  }
    18  

View as plain text