Skip to content

Commit dbfd6f5

Browse files
authored
Merge pull request #5348 from JaSpa/astverifier-null-crash
2 parents c9fa1b2 + b8ea509 commit dbfd6f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/ASTVerifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ struct ASTNodeBase {};
437437
}
438438

439439
// Otherwise, the archetype needs to be from this scope.
440-
if (GenericEnv.empty()) {
440+
if (GenericEnv.empty() || !GenericEnv.back()) {
441441
Out << "AST verification error: archetype outside of generic "
442442
"context: " << archetype->getString() << "\n";
443443
return true;

0 commit comments

Comments
 (0)