Source file test/fixedbugs/issue49378.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  func f(i int) {
    10  	var s1 struct {
    11  		s struct{ s struct{ i int } }
    12  	}
    13  	var s2, s3 struct {
    14  		a struct{ i int }
    15  		b int
    16  	}
    17  	func() {
    18  		i = 1 + 2*i + s3.a.i + func() int {
    19  			s2.a, s2.b = s3.a, s3.b
    20  			return 0
    21  		}() + func(*int) int {
    22  			return s1.s.s.i
    23  		}(new(int))
    24  	}()
    25  }
    26  

View as plain text