File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## v1.3.2
4+ * Fixed checker for string slices.
5+
36## v1.3.1
47* Moved ` conf.Options ` out of internal package.
58
Original file line number Diff line number Diff line change @@ -292,7 +292,9 @@ func (v *visitor) IndexNode(node *ast.IndexNode) reflect.Type {
292292func (v * visitor ) SliceNode (node * ast.SliceNode ) reflect.Type {
293293 t := v .visit (node .Node )
294294
295- if _ , ok := indexType (t ); ok {
295+ _ , isIndex := indexType (t )
296+
297+ if isIndex || isString (t ) {
296298 if node .From != nil {
297299 from := v .visit (node .From )
298300 if ! isInteger (from ) {
Original file line number Diff line number Diff line change @@ -780,6 +780,10 @@ func TestExpr(t *testing.T) {
780780 `Variadic("empty")` ,
781781 []int {},
782782 },
783+ {
784+ `String[:3]` ,
785+ "str" ,
786+ },
783787 }
784788
785789 for _ , tt := range tests {
You can’t perform that action at this time.
0 commit comments