File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,13 @@ class TypeVariableRefFinder : public ASTWalker {
63
63
auto *decl = DRE->getDecl ();
64
64
65
65
if (auto type = CS.getTypeIfAvailable (DRE->getDecl ())) {
66
+ auto &ctx = CS.getASTContext ();
66
67
// If this is not one of the closure parameters which
67
68
// is inferrable from the body, let's replace type
68
69
// variables with errors to avoid bringing external
69
70
// information to the element component.
70
- if (type->hasTypeVariable () && !isa<ParamDecl>(decl)) {
71
+ if (type->hasTypeVariable () &&
72
+ !(isa<ParamDecl>(decl) || decl->getName () == ctx.Id_builderSelf )) {
71
73
// If there are type variables left in the simplified version,
72
74
// it means that this is an invalid external declaration
73
75
// relative to this element's context.
You can’t perform that action at this time.
0 commit comments