mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Make getWitnessType() return Type() for ErrorType.
None of the clients of this care about distinguishing between immediate failures in getWitnessType() vs. earlier errors that result in getWitnessType() returning ErrorType, so simplify the interface by having it always return Type() if there is a problem. Update the clients that were not already checking for null result to do so. Fixes rdar://problem/32215763.
This commit is contained in:
@@ -6473,10 +6473,6 @@ Expr *ExprRewriter::convertLiteral(Expr *literal,
|
||||
if (!argType)
|
||||
return nullptr;
|
||||
|
||||
// If the argument type is in error, we're done.
|
||||
if (argType->hasError())
|
||||
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