Source file test/fixedbugs/issue49029.go

     1  // compile
     2  
     3  // Copyright 2021 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 s struct {
    10  	f func()
    11  }
    12  
    13  func f() {
    14  	ch := make(chan struct{}, 1)
    15  	_ = [...]struct{ slice []s }{
    16  		{}, {}, {}, {},
    17  		{
    18  			slice: []s{
    19  				{
    20  					f: func() { ch <- struct{}{} },
    21  				},
    22  			},
    23  		},
    24  	}
    25  }
    26  

View as plain text