Skip to content

Commit 948417f

Browse files
committed
ASTVerifier: mapTypeIntoContext() might return a sugared type
1 parent 67740fd commit 948417f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/AST/ASTVerifier.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,8 +701,8 @@ class Verifier : public ASTWalker {
701701
auto interfaceType = archetype->getInterfaceType();
702702
auto contextType = archetypeEnv->mapTypeIntoContext(interfaceType);
703703

704-
if (contextType.getPointer() != archetype) {
705-
Out << "Archetype " << archetype->getString() << "does not appear"
704+
if (!contextType->isEqual(archetype)) {
705+
Out << "Archetype " << archetype->getString() << " does not appear"
706706
<< " inside its own generic environment\n";
707707
Out << "Interface type: " << interfaceType.getString() << "\n";
708708
Out << "Contextual type: " << contextType.getString() << "\n";

0 commit comments

Comments
 (0)