1
0
mirror of https://github.com/golang/go synced 2024-11-22 04:14:42 -07:00

runtime: Better test tracebackability of jmpdefer when running a nil defer.

R=bradfitz, dvyukov
CC=golang-dev
https://golang.org/cl/12536046
This commit is contained in:
Keith Randall 2013-08-09 15:27:45 -07:00
parent e3dbb1a310
commit 36f223dace

View File

@ -6,11 +6,17 @@
package main
import "runtime"
type Closer interface {
Close()
}
func nilInterfaceDeferCall() {
defer func() {
// make sure a traceback happens with jmpdefer on the stack
runtime.GC()
}()
var x Closer
defer x.Close()
}