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()
}