llvm-project/llgo/test/llgoi/panic.test

17 lines
254 B
Plaintext

// RUN: llgoi < %s | FileCheck %s
panic("msg")
// CHECK: panic: msg
import "fmt"
func() {
defer func() {
r := recover()
fmt.Println("recovered", r)
}()
panic("msg")
}()
// CHECK-NOT: {{^}}panic:
// CHECK: recovered msg
// CHECK-NOT: {{^}}panic: