github.com/JimmyHuang454/JLS-go@v0.0.0-20230831150107-90d536585ba0/internal/types/testdata/fixedbugs/issue40684.go (about)

     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  package p
     6  
     7  type T[_ any] int
     8  
     9  func f[_ any]() {}
    10  func g[_, _ any]() {}
    11  
    12  func _() {
    13  	_ = f[T /* ERROR without instantiation */ ]
    14  	_ = g[T /* ERROR without instantiation */ , T /* ERROR without instantiation */ ]
    15  }