Source file test/fixedbugs/issue35157.go
1 // compile 2 3 // Copyright 2019 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() { 10 var i int 11 var b *bool 12 var s0, s1, s2 string 13 14 if *b { 15 s2 = s2[:1] 16 i = 1 17 } 18 s1 = s1[i:-i+i] + s1[-i+i:i+2] 19 s1 = s0[i:-i] 20 } 21