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

     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 (
     8          C[T any] interface{~int; M() T}
     9  
    10          _ C[bool]
    11          _ comparable
    12          _ interface {~[]byte | ~string}
    13  
    14          // Alias type declarations may refer to "constraint" types
    15          // like ordinary type declarations.
    16          _ = C[bool]
    17          _ = comparable
    18          _ = interface {~[]byte | ~string}
    19  )
    20  

View as plain text