File tree Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -2359,9 +2359,6 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
2359
2359
llvm::errs () << " \n " ;
2360
2360
}
2361
2361
2362
- // Explicitly calculate this bit.
2363
- (void ) PD->existentialTypeSupported ();
2364
-
2365
2362
// Explicity compute the requirement signature to detect errors.
2366
2363
(void ) PD->getRequirementSignature ();
2367
2364
Original file line number Diff line number Diff line change @@ -13,6 +13,6 @@ struct S : P { // expected-error {{type 'S' does not conform to protocol 'P'}}
13
13
}
14
14
15
15
// FIXME: Lousy diagnostics on this case.
16
- protocol SR9224_Foo : SR9224_Foobar { } // expected-error 2 {{protocol 'SR9224_Foo' refines itself}}
17
- protocol SR9224_Bar : SR9224_Foobar { } // expected-note {{protocol 'SR9224_Bar' declared here}}
16
+ protocol SR9224_Foo : SR9224_Foobar { } // expected-error {{protocol 'SR9224_Foo' refines itself}}
17
+ protocol SR9224_Bar : SR9224_Foobar { }
18
18
typealias SR9224_Foobar = SR9224_Foo & SR9224_Bar
Original file line number Diff line number Diff line change @@ -101,10 +101,10 @@ struct DoesNotConform : Up {
101
101
102
102
// Circular protocols
103
103
104
- protocol CircleMiddle : CircleStart { func circle_middle( ) } // expected-error 2 {{protocol 'CircleMiddle' refines itself}}
105
- // expected-note@-1 {{protocol 'CircleMiddle' declared here}}
106
- protocol CircleStart : CircleEnd { func circle_start( ) } // expected-error {{protocol 'CircleStart' refines itself}}
107
- // expected-note@-1 2 {{protocol 'CircleStart' declared here}}
104
+ protocol CircleMiddle : CircleStart { func circle_middle( ) } // expected-error {{protocol 'CircleMiddle' refines itself}}
105
+ // expected-note@-1 2 {{protocol 'CircleMiddle' declared here}}
106
+ protocol CircleStart : CircleEnd { func circle_start( ) } // expected-error 2 {{protocol 'CircleStart' refines itself}}
107
+ // expected-note@-1 {{protocol 'CircleStart' declared here}}
108
108
protocol CircleEnd : CircleMiddle { func circle_end( ) } // expected-note 3 {{protocol 'CircleEnd' declared here}}
109
109
110
110
protocol CircleEntry : CircleTrivial { }
Original file line number Diff line number Diff line change @@ -138,3 +138,8 @@ struct BadSubscript {
138
138
set { }
139
139
}
140
140
}
141
+
142
+ struct OuterGeneric < T> {
143
+ func contextuallyGenericMethod( ) where T == HasAssoc { }
144
+ // expected-error@-1 {{protocol 'HasAssoc' can only be used as a generic constraint because it has Self or associated type requirements}}
145
+ }
You can’t perform that action at this time.
0 commit comments