File tree Expand file tree Collapse file tree 2 files changed +25
-6
lines changed
lib/AST/RequirementMachine Expand file tree Collapse file tree 2 files changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -292,12 +292,6 @@ struct InferRequirementsWalker : public TypeWalker {
292
292
auto decl = ty->getAnyNominal ();
293
293
if (!decl) return Action::Continue;
294
294
295
- // FIXME: The GSB and the request evaluator both detect a cycle here if we
296
- // force a recursive generic signature. We should look into moving cycle
297
- // detection into the generic signature request(s) - see rdar://55263708
298
- if (!decl->hasComputedGenericSignature ())
299
- return Action::Continue;
300
-
301
295
auto genericSig = decl->getGenericSignature ();
302
296
if (!genericSig)
303
297
return Action::Continue;
Original file line number Diff line number Diff line change
1
+ // RUN: %target-typecheck-verify-swift -requirement-machine-inferred-signatures=on
2
+ // RUN: %target-swift-frontend -typecheck %s -debug-generic-signatures -requirement-machine-inferred-signatures=on 2>&1 | %FileCheck %s
3
+
4
+ protocol P1 { }
5
+
6
+ protocol P2 { }
7
+
8
+ protocol IteratorProtocol {
9
+ associatedtype Element
10
+
11
+ func next( ) -> Element ?
12
+ }
13
+
14
+ // CHECK: requirement_inference_funny_order.(file).LocalArray@
15
+ // CHECK: Generic signature: <Element where Element : P1>
16
+
17
+ // CHECK: ExtensionDecl line={{[0-9]+}} base=LocalArray
18
+ // CHECK: Generic signature: <Element where Element : P1, Element : P2>
19
+ extension LocalArray where Element : P2 {
20
+ static func == ( lhs: Self , rhs: Self ) -> Bool { }
21
+ }
22
+
23
+ struct LocalArray < Element : P1 > : IteratorProtocol {
24
+ func next( ) -> Element ? { }
25
+ }
You can’t perform that action at this time.
0 commit comments