Source file src/internal/types/testdata/fixedbugs/issue83529.go

     1  // Copyright 2026 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 p
     6  
     7  func f[T ~[1]int](T) {}
     8  func _()             { f({ /* ERROR "missing type in composite literal" */ }) }
     9  
    10  func g[T any](struct{ f T }) {}
    11  func _(x int)                { f({ /* ERROR "missing type in composite literal" */ x}) }
    12  
    13  func h[T any](func(T, int)) {}
    14  func _() {
    15  	h(hArg)
    16  }
    17  func hArg[T any](int, T) {}
    18  

View as plain text