...

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

Documentation: internal/types/testdata/fixedbugs

     1  // -gotypesalias=0
     2  
     3  // Copyright 2022 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  package p
     8  
     9  type AC interface {
    10  	C
    11  }
    12  
    13  type ST []int
    14  
    15  type R[S any, P any] struct{}
    16  
    17  type SR = R[SS, ST]
    18  
    19  type SS interface {
    20  	NSR(any) *SR // ERROR "invalid use of type alias SR in recursive type"
    21  }
    22  
    23  type C interface {
    24  	NSR(any) *SR
    25  }
    26  

View as plain text