mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
16 lines
400 B
Swift
16 lines
400 B
Swift
// RUN: %target-swift-frontend -primary-file %s -emit-ir -o - | %FileCheck %s
|
|
|
|
func f() -> Bool? { return nil }
|
|
|
|
({
|
|
guard var b = f() else { return }
|
|
let c = { b = true }
|
|
_ = (b, c)
|
|
})()
|
|
|
|
// CHECK-LABEL: @"$s9alloc_boxyyXEfU_"
|
|
// CHECK-NOT: call void @swift_setDeallocating
|
|
// CHECK: call void @swift_deallocUninitializedObject
|
|
// CHECK-NOT: call void @swift_setDeallocating
|
|
// CHECK: ret void
|