Skip to content

Commit c3d4b3d

Browse files
committed
[AST] Namelookup should only look at parsed generic parameters
We want to make sure not to cause a circular reference by fetching the full generic parameter list when we are creating opaque paramters and result types.
1 parent 5f3191c commit c3d4b3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/AST/ASTScopeLookup.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ NullablePtr<const GenericParamList> ASTScopeImpl::genericParams() const {
166166
}
167167
NullablePtr<const GenericParamList>
168168
AbstractFunctionDeclScope::genericParams() const {
169-
return decl->getGenericParams();
169+
return decl->getParsedGenericParams();
170170
}
171171
NullablePtr<const GenericParamList> SubscriptDeclScope::genericParams() const {
172-
return decl->getGenericParams();
172+
return decl->getParsedGenericParams();
173173
}
174174
NullablePtr<const GenericParamList> GenericTypeScope::genericParams() const {
175175
// For Decls:

0 commit comments

Comments
 (0)