mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
IDE: Fix mismatched ErrorType check
In one place we were calling hasError() and in another directly checking for ErrorType; if we had a type containing an ErrorType as a structural component, we would hit an assertion.
This commit is contained in:
@@ -2537,7 +2537,7 @@ public:
|
||||
}
|
||||
|
||||
// If we won't be able to provide a result, bail out.
|
||||
if (MemberType->is<ErrorType>() && addName.empty() && !needInit)
|
||||
if (MemberType->hasError() && addName.empty() && !needInit)
|
||||
return;
|
||||
|
||||
// Add the constructor, possibly including any default arguments.
|
||||
|
||||
Reference in New Issue
Block a user