Skip to content

Commit aa999e4

Browse files
committed
ASTVerifier: mapTypeIntoContext() might return a sugared type
1 parent cafb0fd commit aa999e4

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
@@ -700,8 +700,8 @@ class Verifier : public ASTWalker {
700700
auto interfaceType = archetype->getInterfaceType();
701701
auto contextType = archetypeEnv->mapTypeIntoContext(interfaceType);
702702

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

0 commit comments

Comments
 (0)