Skip to content

Commit 7bbb6af

Browse files
committed
AST: Revert inherited type request in ConformanceLookupTable.
One of the request triggers added to `ConformanceLookupTable` in #68384 can cause circular request evaluation. Revert the request trigger since it doesn't appear to be necessary for the test cases introduced in that PR. Resolves rdar://115314044
1 parent 35879f4 commit 7bbb6af

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

lib/AST/ConformanceLookupTable.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ void ConformanceLookupTable::inheritConformances(ClassDecl *classDecl,
228228

229229
auto inheritedTypes = classDecl->getInherited();
230230
for (unsigned i : inheritedTypes.getIndices()) {
231-
if (auto inheritedType = inheritedTypes.getResolvedType(i)) {
232-
231+
if (auto inheritedType = inheritedTypes.getEntry(i).getType()) {
233232
if (inheritedType->getClassOrBoundGenericClass()) {
234233
superclassLoc = inheritedTypes.getEntry(i).getSourceRange().Start;
235234
return superclassLoc;

test/Generics/rdar115314044.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// RUN: %target-typecheck-verify-swift
2+
3+
public protocol P {}
4+
5+
public protocol Q {
6+
associatedtype A: P
7+
func f(_: A)
8+
}
9+
10+
open class Parent<C: P>: Q {
11+
public func f(_: C) {}
12+
}
13+
14+
final class Child: Parent<Child.Nested> {
15+
struct Nested: P {}
16+
}

0 commit comments

Comments
 (0)