mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
35 lines
1023 B
Plaintext
35 lines
1023 B
Plaintext
// RUN: %target-sil-opt \
|
|
// RUN: %s \
|
|
// RUN: -enable-experimental-feature NonescapableTypes \
|
|
// RUN: | \
|
|
// RUN: %target-sil-opt \
|
|
// RUN: -enable-experimental-feature NonescapableTypes \
|
|
// RUN: | \
|
|
// RUN: %FileCheck %s
|
|
|
|
// For -enable-experimental-feature NonescapableTypes
|
|
|
|
// REQUIRES: asserts
|
|
// TODO: Once NoncopyableGenerics/NonescapableTypes is no longer behind a feature flag, merge this into basic2.
|
|
|
|
sil_stage raw
|
|
|
|
import Swift
|
|
|
|
// CHECK-LABEL: struct NCG<T> : ~Copyable {
|
|
// CHECK-NEXT: var t: T
|
|
// CHECK-NEXT: deinit
|
|
struct NCG<T> : ~Copyable {
|
|
var t: T
|
|
deinit
|
|
}
|
|
|
|
// CHECK-LABEL: struct NEG<T> : ~Escapable where T : ~Escapable {
|
|
// CHECK-NEXT: var t: T
|
|
struct NEG<T : ~Escapable> : ~Escapable {
|
|
var t: T
|
|
init(_ t: consuming T) {
|
|
self.t = t
|
|
}
|
|
}
|