Work around MSVC bug for equality check of implicit operator conversion of class to base-class pointer with const subclass pointer

This commit is contained in:
Hugh Bellamy
2017-02-11 14:34:11 +07:00
parent 49d134f1a9
commit a2c0e301a7

View File

@@ -1274,7 +1274,9 @@ TypeDecl *ModuleFile::lookupNestedType(Identifier name,
auto declOrOffset = Decls[entry.first - 1];
if (!declOrOffset.isComplete())
continue;
if (declOrOffset != parent)
Decl *decl = declOrOffset;
if (decl != parent)
continue;
return cast<TypeDecl>(getDecl(entry.second));
}