Skip to content

Commit 2ae58c5

Browse files
committed
Revert "fix: possible fix for occasional infinite recursion"
This reverts commit a86cbc1. This caused some values to be ellipsed that shouldn't have been, eg. in Chroma tests: ``` { Pattern: "\\$\\{", - Type: chroma.TokenType(LiteralStringInterpol), + Type: ..., Mutator: &chroma.pushMutator{ States: []string{ "curly", @@ -36,7 +36,7 @@ Pattern: "^(\\w+)(=)", Type: &chroma.byGroupsEmitter{ Emitters: []chroma.Emitter{ - chroma.TokenType(NameAttribute), + ..., chroma.TokenType(Operator), }, }, ```
1 parent a86cbc1 commit 2ae58c5

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed
File renamed without changes.

bin/go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.go-1.24.5.pkg
1+
.go-1.24.3.pkg

bin/gofmt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.go-1.24.5.pkg
1+
.go-1.24.3.pkg

repr.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,7 @@ func (p *Printer) reprValue(seen map[reflect.Value]bool, v reflect.Value, indent
194194
return
195195
}
196196
seen[v] = true
197-
// Under some circumstances I see infinite recursion where I wouldn't expect it, but removing this solves it. Not
198-
// sure why, I haven't been able to narrow it down to a small reproducible case.
199-
200-
// defer delete(seen, v)
197+
defer delete(seen, v)
201198

202199
if v.Kind() == reflect.Invalid || (v.Kind() == reflect.Ptr || v.Kind() == reflect.Map || v.Kind() == reflect.Chan || v.Kind() == reflect.Slice || v.Kind() == reflect.Func || v.Kind() == reflect.Interface) && v.IsNil() {
203200
fmt.Fprint(p.w, "nil")

0 commit comments

Comments
 (0)