3 // Copyright 2012 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.
7 // Test that when the compiler expands append inline it does not
8 // overwrite a value before it needs it (issue 3369).
13 s := make([]byte, 5, 6)
15 s = append(s[:len(s)-1], '5', s[len(s)-1])
16 if string(s) != "123456" {