Merge pull request #37057 from LucianoPAlmeida/placeholder-checkedcast-warn

[Sema] Do not attempt warn extraneous checked cast for placeholder types
This commit is contained in:
Luciano Almeida
2021-04-25 08:03:18 -03:00
committed by GitHub
2 changed files with 8 additions and 1 deletions

View File

@@ -6448,7 +6448,8 @@ static ConstraintFix *maybeWarnAboutExtraneousCast(
return nullptr;
// Both types have to be fixed.
if (fromType->hasTypeVariable() || toType->hasTypeVariable())
if (fromType->hasTypeVariable() || toType->hasTypeVariable() ||
fromType->hasPlaceholder() || toType->hasPlaceholder())
return nullptr;
SmallVector<LocatorPathElt, 4> path;