cmd/compile: panic line number of deferred functions is ambiguous #16011
Labels
FrozenDueToAge
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
Using
go1.6
Consider the following:
Currently, this prints:
However, the stack trace reports that the panic occurs at Line 14 of main, which is technically correct since it is at the end of the function and now executing deferred functions. However, it is ambiguous exactly which of the calls to Foo was part of the real stack trace.
Any thoughts on having the printed line number be the line number where the defer occurred? In this example, it would be Line 11.
The text was updated successfully, but these errors were encountered: