@@ -46,30 +46,29 @@ struct Unrelated {}
4646
4747//
4848// If a class conforms to a protocol concretely, the resulting protocol
49- // composition type should be equivalent to the class type.
50- //
51- // FIXME: Disabled for now.
49+ // composition type should be equivalent to the class type for redeclaration
50+ // checking purposes.
5251//
5352
54- func alreadyConforms< T> ( _: Base < T > ) { } // expected-note {{'alreadyConforms' previously declared here}}
55- func alreadyConforms< T> ( _: Base < T > & P1 ) { } // FIXME e/xpected -error {{invalid redeclaration of 'alreadyConforms'}} expected-note {{'alreadyConforms' previously declared here }}
53+ func alreadyConforms< T> ( _: Base < T > ) { } // expected-note 3 {{'alreadyConforms' previously declared here}}
54+ func alreadyConforms< T> ( _: Base < T > & P1 ) { } // expected -error {{invalid redeclaration of 'alreadyConforms'}}
5655func alreadyConforms< T> ( _: Base < T > & AnyObject ) { } // expected-error {{invalid redeclaration of 'alreadyConforms'}}
5756func alreadyConforms< T> ( _: Base < T > & P1 & AnyObject ) { } // expected-error {{invalid redeclaration of 'alreadyConforms'}}
5857
59- func alreadyConformsMeta< T> ( _: Base < T > . Type ) { } // expected-note {{'alreadyConformsMeta' previously declared here}}
60- func alreadyConformsMeta< T> ( _: ( Base < T > & P1 ) . Type) { } // FIXME e/xpected -error {{invalid redeclaration of 'alreadyConformsMeta'}} expected-note {{'alreadyConformsMeta' previously declared here }}
61- func alreadyConformsMeta< T> ( _: ( Base < T > & P1 ) . Protocol) { } // FIXME e/xpected -error {{invalid redeclaration of 'alreadyConformsMeta'}} expected-note 3 {{'alreadyConformsMeta' previously declared here }}
58+ func alreadyConformsMeta< T> ( _: Base < T > . Type ) { } // expected-note 7 {{'alreadyConformsMeta' previously declared here}}
59+ func alreadyConformsMeta< T> ( _: ( Base < T > & P1 ) . Type) { } // expected -error {{invalid redeclaration of 'alreadyConformsMeta'}}
60+ func alreadyConformsMeta< T> ( _: ( Base < T > & P1 ) . Protocol) { } // expected -error {{invalid redeclaration of 'alreadyConformsMeta'}}
6261func alreadyConformsMeta< T> ( _: ( any Base < T > & P1 ) . Type) { } // expected-error {{invalid redeclaration of 'alreadyConformsMeta'}}
6362func alreadyConformsMeta< T> ( _: ( Base < T > & AnyObject ) . Type) { } // expected-error {{invalid redeclaration of 'alreadyConformsMeta'}}
6463func alreadyConformsMeta< T> ( _: ( Base < T > & P1 & AnyObject ) . Type) { } // expected-error {{invalid redeclaration of 'alreadyConformsMeta'}}
6564func alreadyConformsMeta< T> ( _: ( Base < T > & P1 & AnyObject ) . Protocol) { } // expected-error {{invalid redeclaration of 'alreadyConformsMeta'}}
6665func alreadyConformsMeta< T> ( _: ( any Base < T > & P1 & AnyObject ) . Type) { } // expected-error {{invalid redeclaration of 'alreadyConformsMeta'}}
6766
68- func alreadyConforms( _: P3 ) { } // e/xpected -note {{'alreadyConforms' previously declared here}}
69- func alreadyConforms( _: P3 & AnyObject ) { } // FIXME e/xpected -error {{invalid redeclaration of 'alreadyConforms'}}
67+ func alreadyConforms( _: P3 ) { } // expected -note {{'alreadyConforms' previously declared here}}
68+ func alreadyConforms( _: P3 & AnyObject ) { } // expected -error {{invalid redeclaration of 'alreadyConforms'}}
7069
71- func alreadyConformsMeta( _: P3 . Type ) { } // FIXME e/xpected -note {{'alreadyConformsMeta' previously declared here}}
72- func alreadyConformsMeta( _: ( P3 & AnyObject ) . Type) { } // FIXME ex/pected -error {{invalid redeclaration of 'alreadyConformsMeta'}}
70+ func alreadyConformsMeta( _: P3 . Type ) { } // expected -note {{'alreadyConformsMeta' previously declared here}}
71+ func alreadyConformsMeta( _: ( P3 & AnyObject ) . Type) { } // expected -error {{invalid redeclaration of 'alreadyConformsMeta'}}
7372
7473// SE-0156 stipulates that a composition can contain multiple classes, as long
7574// as they are all the same.
0 commit comments