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

     1  // Copyright 2025 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 A[_ any] = any
     8  
     9  // This must not panic; also the error message must match the style for non-alias types, below.
    10  func _[_ A /* ERROR "too many type arguments for type A: have 2, want 1" */ [int, string]]() {}
    11  
    12  type T[_ any] any
    13  
    14  func _[_ T /* ERROR "too many type arguments for type T: have 2, want 1" */ [int, string]]() {}
    15  

View as plain text