Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
reflect: fatal error: reflect mismatch when reflect.MakeFunc is used as a goroutine #25897
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
changed the title
fatal error: reflect mismatch when reflect.MakeFunc is used as a goroutine
Jun 14, 2018
The easy, shallow fix for this is probably to teach the compiler to do the “wrap in a closure” trick itself. It already does that for a print and some other builtins; this probably just requires adding a special case for (say) any calls in package reflect. Might be a decent starter issue for someone working on the compiler.
It looks like the problem is scanning a goroutine where the top level function is
Here's a simpler repro:
@josharian I don't think the wrapper strategy will work. At the point of the