| 1 |
// Copyright 2024 The Go Authors. All rights reserved. |
| 2 |
// Use of this source code is governed by a BSD-style |
| 3 |
// license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
// Code generated with somegen DO NOT EDIT. |
| 6 |
|
| 7 |
package testdata |
| 8 |
|
| 9 |
var ( |
| 10 |
a [10]byte |
| 11 |
b [20]float32 |
| 12 |
s []int |
| 13 |
t struct { |
| 14 |
s []byte |
| 15 |
} |
| 16 |
|
| 17 |
_ = a[0:] |
| 18 |
_ = a[1:10] |
| 19 |
_ = a[2:len(a)] // No simplification fix is offered in generated code. |
| 20 |
_ = a[3:(len(a))] |
| 21 |
_ = a[len(a)-1 : len(a)] // No simplification fix is offered in generated code. |
| 22 |
_ = a[2:len(a):len(a)] |
| 23 |
|
| 24 |
_ = a[:] |
| 25 |
_ = a[:10] |
| 26 |
_ = a[:len(a)] // No simplification fix is offered in generated code. |
| 27 |
_ = a[:(len(a))] |
| 28 |
_ = a[:len(a)-1] |
| 29 |
_ = a[:len(a):len(a)] |
| 30 |
|
| 31 |
_ = s[0:] |
| 32 |
_ = s[1:10] |
| 33 |
_ = s[2:len(s)] // No simplification fix is offered in generated code. |
| 34 |
_ = s[3:(len(s))] |
| 35 |
_ = s[len(a) : len(s)-1] |
| 36 |
_ = s[0:len(b)] |
| 37 |
_ = s[2:len(s):len(s)] |
| 38 |
|
| 39 |
_ = s[:] |
| 40 |
_ = s[:10] |
| 41 |
_ = s[:len(s)] // No simplification fix is offered in generated code. |
| 42 |
_ = s[:(len(s))] |
| 43 |
_ = s[:len(s)-1] |
| 44 |
_ = s[:len(b)] |
| 45 |
_ = s[:len(s):len(s)] |
| 46 |
|
| 47 |
_ = t.s[0:] |
| 48 |
_ = t.s[1:10] |
| 49 |
_ = t.s[2:len(t.s)] |
| 50 |
_ = t.s[3:(len(t.s))] |
| 51 |
_ = t.s[len(a) : len(t.s)-1] |
| 52 |
_ = t.s[0:len(b)] |
| 53 |
_ = t.s[2:len(t.s):len(t.s)] |
| 54 |
|
| 55 |
_ = t.s[:] |
| 56 |
_ = t.s[:10] |
| 57 |
_ = t.s[:len(t.s)] |
| 58 |
_ = t.s[:(len(t.s))] |
| 59 |
_ = t.s[:len(t.s)-1] |
| 60 |
_ = t.s[:len(b)] |
| 61 |
_ = t.s[:len(t.s):len(t.s)] |
| 62 |
) |
| 63 |
|
| 64 |
func _() { |
| 65 |
s := s[0:len(s)] // No simplification fix is offered in generated code. |
| 66 |
_ = s |
| 67 |
} |
| 68 |
|
| 69 |
func m() { |
| 70 |
maps := []int{} |
| 71 |
_ = maps[1:len(maps)] // No simplification fix is offered in generated code. |
| 72 |
} |