Skip to content

Commit 95a8d08

Browse files
committed
Sema: print type alias underlying types when debugging generics
With the recent change to StructuralTypeRequest where all returned types are wrapped in a TypeAliasType, printing the requirement signature could display requirements such as `Self.P3Assoc == Self.P3Assoc`. This change will make sure that when in debug mode, the underlying type will be displayed instead on the RHS.
1 parent da4a38c commit 95a8d08

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2930,7 +2930,10 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
29302930
PD->dumpRef(llvm::errs());
29312931
llvm::errs() << "\n";
29322932
llvm::errs() << "Requirement signature: ";
2933-
requirementsSig->print(llvm::errs());
2933+
2934+
PrintOptions opts;
2935+
opts.PrintTypeAliasUnderlyingType = true;
2936+
requirementsSig->print(llvm::errs(), opts);
29342937
llvm::errs() << "\n";
29352938

29362939
// Note: One cannot canonicalize a requirement signature, because

0 commit comments

Comments
 (0)