mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When failing to find a suitable type witness, always record ErrorType.
Fixes the crash in rdar://problem/20564378. In these cases, we end up swallowing some diagnostics. That will be addressed in a subsequent commit. Swift SVN r27436
This commit is contained in:
@@ -5199,6 +5199,10 @@ Expr *ExprRewriter::convertLiteral(Expr *literal,
|
||||
if (!argType)
|
||||
return nullptr;
|
||||
|
||||
// If the argument type is in error, we're done.
|
||||
if (argType->is<ErrorType>())
|
||||
return nullptr;
|
||||
|
||||
// Convert the literal to the non-builtin argument type via the
|
||||
// builtin protocol, first.
|
||||
// FIXME: Do we need an opened type here?
|
||||
|
||||
Reference in New Issue
Block a user