Files
swift-mirror/validation-test/Sema/rdar149385088.swift
2025-06-11 13:15:22 -07:00

25 lines
498 B
Swift

// RUN: %target-typecheck-verify-swift \
// RUN: -enable-experimental-feature Lifetimes \
// RUN: -enable-experimental-feature CoroutineAccessors
// REQUIRES: swift_feature_Lifetimes
// REQUIRES: swift_feature_CoroutineAccessors
struct NE<T : ~Copyable & ~Escapable> : ~Copyable & ~Escapable {
@_lifetime(&t)
init(
t: inout T
)
{
}
}
struct S : ~Copyable & ~Escapable {
var mutableBytes: NE<S> {
@_lifetime(&self)
mutating get {
return NE(t: &self)
}
}
}