...

Text file src/go/parser/testdata/issue50427.go2

Documentation: go/parser/testdata

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

View as plain text