|
|
|
|
|
by jschlatter
4076 days ago
|
|
Thanks for the concrete example. The transformed source code that would get compiled for this example looks like: scope.Declare("x", &x)
godebug.Line(ctx, scope, 3)
x = 1
godebug.Line(ctx, scope, 4)
x = 2
godebug.Line(ctx, scope, 5)
bar()
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. |
|
Now, in your world, it can't.
So before, you would have seen x=1 in the call to bar, and now when you use the debug library, you will see x=2.