Simplify handling of ErrorType

The typechecker is not creating (LValueType (ErrorType)) anymore.


Swift SVN r7703
This commit is contained in:
Dmitri Hrybenko
2013-08-28 23:57:48 +00:00
parent 37081772f6
commit d3d16755cf
4 changed files with 4 additions and 14 deletions

View File

@@ -1000,6 +1000,9 @@ ProtocolType::ProtocolType(ProtocolDecl *TheDecl, const ASTContext &Ctx)
/*HasTypeVariable=*/false) { }
LValueType *LValueType::get(Type objectTy, Qual quals, const ASTContext &C) {
assert(!objectTy->is<ErrorType>() &&
"can not have ErrorType wrapped inside LValueType");
bool hasTypeVariable = objectTy->hasTypeVariable();
auto arena = getArena(hasTypeVariable);