|
1 | | -// RUN: %target-typecheck-verify-swift \ |
2 | | -// RUN: -disable-availability-checking \ |
3 | | -// RUN: -enable-experimental-feature BitwiseCopyable \ |
4 | | -// RUN: -enable-builtin-module \ |
| 1 | +// RUN: %target-typecheck-verify-swift \ |
| 2 | +// RUN: -disable-availability-checking \ |
| 3 | +// RUN: -enable-experimental-feature NonescapableTypes \ |
| 4 | +// RUN: -enable-experimental-feature NoncopyableGenerics \ |
| 5 | +// RUN: -enable-experimental-feature BitwiseCopyable \ |
| 6 | +// RUN: -enable-builtin-module \ |
5 | 7 | // RUN: -debug-diagnostic-names |
6 | 8 |
|
7 | 9 | //============================================================================== |
@@ -154,8 +156,8 @@ func passAnyAny(_ a: any Any) { take3(a) } // expected-error {{type_does_not_con |
154 | 156 | func passString(_ s: String) { take3(s) } // expected-error {{type_does_not_conform_decl_owner}} |
155 | 157 | // expected-note@-17 {{where_requirement_failure_one_subst}} |
156 | 158 |
|
157 | | -extension Optional { |
158 | | - struct Some : _BitwiseCopyable { |
| 159 | +extension Optional where Wrapped : Copyable & Escapable { |
| 160 | + struct Some : _BitwiseCopyable & Copyable & Escapable { |
159 | 161 | var wrapped: Wrapped // expected-error {{non_bitwise_copyable_type_member}} |
160 | 162 | } |
161 | 163 | } |
@@ -184,8 +186,12 @@ struct S_Explicit_With_2_BitwiseCopyable_Generic_Optional<T : _BitwiseCopyable> |
184 | 186 | var o2: T? |
185 | 187 | } |
186 | 188 |
|
| 189 | +struct S_Explicit_Nonescapable : ~Escapable, _BitwiseCopyable {} // expected-error{{non_bitwise_copyable_type_nonescapable}} |
| 190 | + |
| 191 | +struct S_Explicit_Noncopyable : ~Copyable, _BitwiseCopyable {} // expected-error{{non_bitwise_copyable_type_noncopyable}} |
| 192 | + |
187 | 193 | //============================================================================== |
188 | | -//==========================STDLIB-DEPENDENCY TESTS=(BEGIN)==================={{ |
| 194 | +//==========================STDLIB-DEPENDENCY TESTS=(END)=====================}} |
189 | 195 | //============================================================================== |
190 | 196 |
|
191 | 197 | //============================================================================== |
|
0 commit comments