Source file test/fixedbugs/issue58671.go

     1  // run
     2  
     3  // Copyright 2023 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 main
     8  
     9  func g[P any](...P) P { var zero P; return zero }
    10  
    11  var (
    12  	_ int        = g(1, 2)
    13  	_ rune       = g(1, 'a')
    14  	_ float64    = g(1, 'a', 2.3)
    15  	_ float64    = g('a', 2.3)
    16  	_ complex128 = g(2.3, 'a', 1i)
    17  )
    18  
    19  func main() {}
    20  

View as plain text