File tree Expand file tree Collapse file tree 2 files changed +1
-8
lines changed Expand file tree Collapse file tree 2 files changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -2571,10 +2571,7 @@ bool ContextualFailure::trySequenceSubsequenceFixIts(
2571
2571
return false ;
2572
2572
2573
2573
auto String = TypeChecker::getStringType (getASTContext ());
2574
- auto Substring = TypeChecker::getSubstringType (getASTContext ());
2575
-
2576
- if (!String || !Substring)
2577
- return false ;
2574
+ auto Substring = getASTContext ().getSubstringDecl ()->getDeclaredInterfaceType ();
2578
2575
2579
2576
// Substring -> String conversion
2580
2577
// Wrap in String.init
Original file line number Diff line number Diff line change @@ -387,10 +387,6 @@ Type TypeChecker::getStringType(ASTContext &Context) {
387
387
return Type ();
388
388
}
389
389
390
- Type TypeChecker::getSubstringType (ASTContext &Context) {
391
- if (auto typeDecl = Context.getSubstringDecl ())
392
- return typeDecl->getDeclaredInterfaceType ();
393
-
394
390
return Type();
395
391
}
396
392
You can’t perform that action at this time.
0 commit comments