@@ -35,7 +35,8 @@ protocol Rope<Element>: ~Copyable { // expected-error {{cannot suppress conforma
35
35
extension S : ~ Copyable { } // expected-error {{cannot suppress conformances here}}
36
36
// expected-error@-1 {{cannot find type 'Copyable' in scope}}
37
37
38
- func takeNoncopyableGeneric< T: ~ Copyable> ( _ t: T ) { } // expected-error {{expected a class type or protocol-constrained type restricting 'T'}}
38
+ func takeNoncopyableGeneric< T: ~ Copyable> ( _ t: T ) { } // expected-error {{cannot suppress conformances here}}
39
+ // expected-error@-1 {{cannot find type 'Copyable' in scope}}
39
40
40
41
@_moveOnly struct ExtraNonCopyable : // expected-error {{duplicate attribute}}{{1-12=}}
41
42
~ Copyable // expected-note {{attribute already specified here}}
@@ -45,3 +46,24 @@ func takeNoncopyableGeneric<T: ~Copyable>(_ t: T) {} // expected-error {{expecte
45
46
struct HasADeinit : ~ Copyable {
46
47
deinit { }
47
48
}
49
+
50
+ func more( ) {
51
+ let foo: any ~ Copyable = 19 // expected-error@:16 {{cannot suppress conformances here}}
52
+ // expected-error@-1 {{cannot find type 'Copyable' in scope}}
53
+
54
+ let foo: any ~ Equatable = 19 // expected-error@:16 {{cannot suppress conformances here}}
55
+ }
56
+
57
+ func blah< T> ( _ t: T ) where T: ~ Copyable, // expected-error@:31 {{cannot suppress conformances here}}
58
+ // expected-error@-1 {{cannot find type 'Copyable' in scope}}
59
+
60
+ T: ~ Hashable { } // expected-error@:31 {{cannot suppress conformances here}}
61
+
62
+ func foo< T: ~ Copyable> ( x: T ) { } // expected-error {{cannot suppress conformances here}}
63
+ // expected-error@-1 {{cannot find type 'Copyable' in scope}}
64
+
65
+ struct Buurap < T: ~ Copyable> { } // expected-error {{cannot suppress conformances here}}
66
+ // expected-error@-1 {{cannot find type 'Copyable' in scope}}
67
+
68
+ protocol Foo where Self: ~ Copyable { } // expected-error {{cannot suppress conformances here}}
69
+ // expected-error@-1 {{cannot find type 'Copyable' in scope}}
0 commit comments