@@ -35,7 +35,8 @@ protocol Rope<Element>: ~Copyable { // expected-error {{cannot suppress conforma
3535extension S : ~ Copyable { } // expected-error {{cannot suppress conformances here}}
3636 // expected-error@-1 {{cannot find type 'Copyable' in scope}}
3737
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}}
3940
4041@_moveOnly struct ExtraNonCopyable : // expected-error {{duplicate attribute}}{{1-12=}}
4142 ~ Copyable // expected-note {{attribute already specified here}}
@@ -45,3 +46,24 @@ func takeNoncopyableGeneric<T: ~Copyable>(_ t: T) {} // expected-error {{expecte
4546struct HasADeinit : ~ Copyable {
4647 deinit { }
4748}
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