mirror of
https://github.com/golang/go
synced 2024-09-04 23:44:16 +00:00
![Giovanni Bajo](/assets/img/avatar_default.png)
Updates #35157 (the bug there was fixed by CL200861) Change-Id: I67069207b4cdc2ad4a475dd0bbc8555ecc5f534f Reviewed-on: https://go-review.googlesource.com/c/go/+/203598 Run-TryBot: Giovanni Bajo <rasky@develer.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
21 lines
325 B
Go
21 lines
325 B
Go
// compile
|
|
|
|
// Copyright 2019 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package p
|
|
|
|
func f() {
|
|
var i int
|
|
var b *bool
|
|
var s0, s1, s2 string
|
|
|
|
if *b {
|
|
s2 = s2[:1]
|
|
i = 1
|
|
}
|
|
s1 = s1[i:-i+i] + s1[-i+i:i+2]
|
|
s1 = s0[i:-i]
|
|
}
|