mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
Updated LoopvarExperiment (markdown)
parent
44f8da4317
commit
70e39688cc
@ -159,6 +159,8 @@ that execute incorrectly.
|
|||||||
|
|
||||||
C# made a similar change in C# 5.0 and [they also reported](https://github.com/golang/go/discussions/56010#discussioncomment-3788526) having very few problems caused by the change.
|
C# made a similar change in C# 5.0 and [they also reported](https://github.com/golang/go/discussions/56010#discussioncomment-3788526) having very few problems caused by the change.
|
||||||
|
|
||||||
|
More breaking or surprising cases are shown in [here](https://github.com/golang/go/issues/60078#issuecomment-1544324607) and [here](https://github.com/golang/go/issues/60078#issuecomment-1546019456).
|
||||||
|
|
||||||
## How often does the change break real programs?
|
## How often does the change break real programs?
|
||||||
|
|
||||||
Empirically, almost never. Testing on Google's codebase found many tests were fixed. It also identified some buggy tests incorrectly passing due to bad interactions between loop variables and `t.Parallel`, like in `TestAllEvenBuggy` above. We rewrote those tests to correct them.
|
Empirically, almost never. Testing on Google's codebase found many tests were fixed. It also identified some buggy tests incorrectly passing due to bad interactions between loop variables and `t.Parallel`, like in `TestAllEvenBuggy` above. We rewrote those tests to correct them.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user