File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: split-file %s %t
3
+
4
+ // RUN: %target-swift-frontend \
5
+ // RUN: %t/Downstream.swift \
6
+ // RUN: -typecheck -verify \
7
+ // RUN: -enable-experimental-feature NonescapableTypes \
8
+ // RUN: -enable-experimental-feature BitwiseCopyable \
9
+ // RUN: -enable-builtin-module \
10
+ // RUN: -debug-diagnostic-names \
11
+ // RUN: -import-objc-header %t/Library.h
12
+
13
+ //--- Library.h
14
+
15
+ struct Tenple {
16
+ int i0 ;
17
+ int i1 ;
18
+ int i2 ;
19
+ int i3 ;
20
+ int i4 ;
21
+ int i5 ;
22
+ int i6 ;
23
+ int i7 ;
24
+ int i8 ;
25
+ int i9 ;
26
+ } ;
27
+
28
+ struct Ints128 {
29
+ int is[ 128 ] ;
30
+ } ;
31
+
32
+ struct VoidPointers {
33
+ void * p1;
34
+ void * p2;
35
+ void * p3;
36
+ void * p4;
37
+ void * p5;
38
+ void * p6;
39
+ void * p7;
40
+ void * p8;
41
+ void * p9;
42
+ void * p10;
43
+ } ;
44
+
45
+ //--- Downstream.swift
46
+
47
+ func take< T : _BitwiseCopyable > ( _ t: T ) { }
48
+
49
+ func passTenple( _ t: Tenple ) { take ( t) }
50
+ func passInts128( _ t: Ints128 ) {
51
+ take ( t)
52
+ take ( t. is. 0 )
53
+ take ( t. is. 17 )
54
+ }
55
+ func passVoidPointers( _ t: VoidPointers ) {
56
+ take ( t)
57
+ take ( t. p10)
58
+ }
You can’t perform that action at this time.
0 commit comments