github.com/golang/gofrontend@v0.0.0-20240429183944-60f985a78526/libgo/misc/cgo/test/typeparam.go (about)

     1  // Copyright 2021 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 cgotest
     6  
     7  // #include <stddef.h>
     8  import "C"
     9  
    10  /* FIXME: Commented out for gofrontend.
    11  
    12  func generic[T, U any](t T, u U) {}
    13  
    14  func useGeneric() {
    15  	const zero C.size_t = 0
    16  
    17  	generic(zero, zero)
    18  	generic[C.size_t, C.size_t](0, 0)
    19  }
    20  
    21  */