Source file test/fixedbugs/issue53018.go

     1  // compile
     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  var V []int
    10  
    11  func f(i int, c chan int) int {
    12  	arr := []int{0, 1}
    13  	for range c {
    14  		for a2 := range arr {
    15  			var a []int
    16  			V = V[:1/a2]
    17  			a[i] = 0
    18  		}
    19  		return func() int {
    20  			arr = []int{}
    21  			return func() int {
    22  				return func() int {
    23  					return func() int { return 4 }()
    24  				}()
    25  			}()
    26  		}()
    27  	}
    28  
    29  	return 0
    30  }
    31  

View as plain text