...

Source file src/cmd/compile/internal/syntax/testdata/issue48382.go

Documentation: cmd/compile/internal/syntax/testdata

     1  // Copyright 2021 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 _ func /* ERROR function type must have no type parameters */ [ /* ERROR empty type parameter list */ ]()
     8  type _ func /* ERROR function type must have no type parameters */ [ x /* ERROR missing type constraint */ ]()
     9  type _ func /* ERROR function type must have no type parameters */ [P any]()
    10  
    11  var _ = (func /* ERROR function type must have no type parameters */ [P any]())(nil)
    12  var _ = func /* ERROR function type must have no type parameters */ [P any]() {}
    13  
    14  type _ interface{
    15          m /* ERROR interface method must have no type parameters */ [P any]()
    16  }
    17  

View as plain text