Comment
Comment by jschlatter
Thanks for the concrete example. The transformed source code that would get compiled for this example looks like:
The value of x is visible to all of the godebug.Line calls, so the compiler should know that it can't move x = 2 to after the call to bar.