3 // Copyright 2016 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
11 type Closer interface {
15 func nilInterfaceDeferCall() {
18 // if it panics when evaluating x.Close, it should not reach here
22 func shouldPanic(f func()) {
25 panic("did not panic")
32 shouldPanic(nilInterfaceDeferCall)