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:
Slava Pestov
2017-09-19 19:04:51 -07:00
parent 7ba0f1ac82
commit ddd0666e94
3 changed files with 4 additions and 5 deletions

View File

@@ -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.