Text file src/go/types/testdata/fixedbugs/issue48582.go2

     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 N /* ERROR cycle */ interface {
     8  	int | N
     9  }
    10  
    11  type A /* ERROR cycle */ interface {
    12  	int | B
    13  }
    14  
    15  type B interface {
    16  	int | A
    17  }
    18  
    19  type S /* ERROR cycle */ struct {
    20  	I // ERROR interface contains type constraints
    21  }
    22  
    23  type I interface {
    24  	int | S
    25  }
    26  
    27  type P interface {
    28  	*P // ERROR interface contains type constraints
    29  }
    30  

View as plain text