diff options
Diffstat (limited to 'src/runtime/stack_test.go')
| -rw-r--r-- | src/runtime/stack_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/runtime/stack_test.go b/src/runtime/stack_test.go index f52381710d..7bc63967bb 100644 --- a/src/runtime/stack_test.go +++ b/src/runtime/stack_test.go @@ -787,3 +787,11 @@ func TestTracebackAncestors(t *testing.T) { } } } + +// Test that defer closure is correctly scanned when the stack is scanned. +func TestDeferLiveness(t *testing.T) { + output := runTestProg(t, "testprog", "DeferLiveness", "GODEBUG=clobberfree=1") + if output != "" { + t.Errorf("output:\n%s\n\nwant no output", output) + } +} |
