File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
validation-test/SILOptimizer Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ // RUN: %target-swift-frontend \
2+ // RUN: -disable-availability-checking \
3+ // RUN: -target %target-swift-5.9-abi-triple \
4+ // RUN: -emit-sil -verify \
5+ // RUN: -enable-experimental-feature LifetimeDependence \
6+ // RUN: -enable-experimental-feature Embedded \
7+ // RUN: %s
8+
9+ // REQUIRES: OS=macosx || OS=linux-gnu
10+ // REQUIRES: swift_feature_Embedded
11+ // REQUIRES: swift_feature_LifetimeDependence
12+
13+ // XFAIL: *
14+
15+ struct NoEscapeNoCopy : ~ Escapable, ~ Copyable { }
16+
17+ protocol Foo {
18+ var bar : NoEscapeNoCopy { get }
19+ }
20+
21+ public struct Baz : Foo {
22+ var bar : NoEscapeNoCopy {
23+ NoEscapeNoCopy ( ) // expected-error{{lifetime-dependent value escapes its scope}}
24+ // expected-note@-1{{it depends on the lifetime of this parent value}}
25+ } // expected-note{{this use causes the lifetime-dependent value to escape}}
26+ }
You can’t perform that action at this time.
0 commit comments