mirror of
https://github.com/golang/go
synced 2024-11-15 10:50:37 -07:00
129a2fcf6c
CL 342350 fixed deadcode panic with dead hidden closures. However, a closure may contains nested dead hidden closures, so we need to mark them dead as well. Fixes #51839 Change-Id: Ib54581adfc1bdea60e74d733cd30fd8e783da983 Reviewed-on: https://go-review.googlesource.com/c/go/+/394079 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
23 lines
317 B
Go
23 lines
317 B
Go
// compile
|
|
|
|
// Copyright 2022 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package main
|
|
|
|
func main() {
|
|
testRecover()
|
|
|
|
}
|
|
|
|
func testRecover() {
|
|
if false {
|
|
func() {
|
|
defer func() {
|
|
_ = recover()
|
|
}()
|
|
}()
|
|
}
|
|
}
|