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

     1  // Copyright 2026 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  import "unsafe"
     8  
     9  type _ A // force type-checking of A first; order is relevant
    10  type A /* ERROR "invalid recursive type A" */ = T
    11  type T [unsafe.Sizeof(A{})]int
    12  
    13  // same as above, but through a chain of aliases
    14  type _ A1
    15  type A1 /* ERROR "invalid recursive type A1" */ = A2
    16  type A2 = U
    17  type U [unsafe.Sizeof(A1{})]int
    18  

View as plain text