You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following valid Go code causes the type checker to panic, at 1.19 and tip. At 1.18 it merely causes a confusing compilation error (because we cautiously didn't panic at the unification depth limit).
The reason is that function literal type-checking clobbers the environment used to detect self-recursive instantiation in https://go.dev/cl/385494.
This seems like a panic that would not be that hard to encounter, though it is clearly not a burning fire since it has been present since the initial launch of generics.
I think we should probably fix for 1.20, and perhaps backport.
The following valid Go code causes the type checker to panic, at 1.19 and tip. At 1.18 it merely causes a confusing compilation error (because we cautiously didn't panic at the unification depth limit).
https://go.dev/play/p/9-OrhazCB7t?v=gotip
The reason is that function literal type-checking clobbers the environment used to detect self-recursive instantiation in https://go.dev/cl/385494.
This seems like a panic that would not be that hard to encounter, though it is clearly not a burning fire since it has been present since the initial launch of generics.
I think we should probably fix for 1.20, and perhaps backport.
CC @griesemer
The text was updated successfully, but these errors were encountered: