You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func passMemoryLayout<T>(_ m:MemoryLayout<T>){take(m)} // expected-error{{global function 'take' requires that 'MemoryLayout<T>' conform to '_BitwiseCopyable'}}
func passUnicode(_ m:Unicode){take(m)} // expected-error{{global function 'take' requires that 'Unicode' conform to '_BitwiseCopyable'}}
46
+
// expected-note@-17{{where 'T' = 'Unicode'}}
43
47
44
48
import Builtin
45
49
@@ -62,3 +66,33 @@ enum E_Raw_String : String {
62
66
}
63
67
64
68
func passE_Raw_String(_ e:E_Raw_String){take(e)}
69
+
70
+
struct S_Suppressed :~_BitwiseCopyable {
71
+
vari:Int
72
+
}
73
+
74
+
func passS_Suppressed(_ s:S_Suppressed){take(s)} // expected-error{{global function 'take' requires that 'S_Suppressed' conform to '_BitwiseCopyable'}}
extensionS_Suppressed_Extension:~_BitwiseCopyable {} // expected-error{{conformance to inferrable protocol '_BitwiseCopyable' cannot be suppressed in an extension}}
79
+
80
+
structS_Explicit_Suppressed:_BitwiseCopyable,~_BitwiseCopyable {} // expected-error{{cannot both conform to and suppress conformance to 'BitwiseCopyable'}}
structS_Suppressed_Explicit:~_BitwiseCopyable, _BitwiseCopyable {} // expected-error{{cannot both conform to and suppress conformance to 'BitwiseCopyable'}}
0 commit comments