github.com/AndrienkoAleksandr/go@v0.0.19/src/go/parser/testdata/issue50427.go2 (about)

     1  // Copyright 2022 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 interface{ m[ /* ERROR "must have no type parameters" */ P any]() }
     8  
     9  func _(t T) {
    10  	var _ interface{ m[ /* ERROR "must have no type parameters" */ P any](); n() } = t
    11  }
    12  
    13  type S struct{}
    14  
    15  func (S) m[ /* ERROR "must have no type parameters" */ P any]() {}
    16  
    17  func _(s S) {
    18  	var _ interface{ m[ /* ERROR "must have no type parameters" */ P any](); n() } = s
    19  }