File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 4444// CHECK: func __getIteratorBoxUnsafe() -> IteratorBox
4545// CHECK-SKIP-UNSAFE-NOT: func __getIteratorBoxUnsafe() -> IteratorBox
4646// CHECK: }
47+
48+ // CHECK: struct StructCopyableMovableAnnotatedNonCopyable
Original file line number Diff line number Diff line change 1- // Test various aspects of the C++ `nodiscard` keyword.
2-
31// RUN: %target-typecheck-verify-swift -I %S/Inputs -cxx-interoperability-mode=upcoming-swift
42
53import TypeClassification
64
75func test( ) {
6+ let x = StructWithPointerNonCopyableTriviallyMovable ( )
7+ let v = copy x // expected-error {{'copy' cannot be applied to noncopyable types}}
8+ _ = v
9+ }
10+
11+ func testField( ) {
12+ let x = StructWithPointerNonCopyableTriviallyMovableField ( )
13+ let v = copy x // expected-error {{'copy' cannot be applied to noncopyable types}}
14+ _ = v
15+ }
16+
17+ func testAnnotated( ) {
818 let x = StructCopyableMovableAnnotatedNonCopyable ( )
919 let v = copy x // expected-error {{'copy' cannot be applied to noncopyable types}}
1020 _ = v
1121}
1222
1323test ( )
24+ testField ( )
25+ testAnnotated ( )
You can’t perform that action at this time.
0 commit comments