4 ms·
There were certainly buggy tests that relied on the old behavior. We didn't find any actual code that relied _correctly_ on the old behavior. https://go.dev/wi
by rsc 2y ago
There were certainly buggy tests that relied on the old behavior. We didn't find any actual code that relied _correctly_ on the old behavior.
https://go.dev/wiki/LoopvarExperiment https://go.dev/wiki/LoopvarExperiment
- dgb23 2y agoLove it, even though it must have been incredibly confusing when old tests failed at first. The assumption being that the tests were correct. They _passed_ all those months or years! I'm just also watching your YT video on testing and enjoying it very much!
- tapirl 2y agoThe tests are in the simplest forms, there are more complex use cases of traditional "for" loops. The complex cases are never explored by the authors of the change. And there are a large quantity of private Go code in the world.