mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Explorer: improve type checking trace output (#3039)
Updates the trace output for type checking to be more consistent like the rest of trace output. This PR also includes few changes in the lit tests related to trace output. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
co-authored by
Richard Smith
parent
6d3a4b84cb
commit
a359da37c4
@@ -415,10 +415,11 @@ auto ImplScope::TryResolveInterfaceHere(
|
||||
|
||||
// TODO: Add indentation when printing the parents.
|
||||
void ImplScope::Print(llvm::raw_ostream& out) const {
|
||||
out << "impl declarations: ";
|
||||
llvm::ListSeparator sep;
|
||||
llvm::ListSeparator sep(",\n ");
|
||||
out << " + "
|
||||
<< "[";
|
||||
for (const ImplFact& impl : impl_facts_) {
|
||||
out << sep << *(impl.type) << " as " << *(impl.interface);
|
||||
out << sep << "`" << *(impl.type) << "` as `" << *(impl.interface) << "`";
|
||||
if (impl.sort_key) {
|
||||
out << " " << *impl.sort_key;
|
||||
}
|
||||
@@ -427,10 +428,10 @@ void ImplScope::Print(llvm::raw_ostream& out) const {
|
||||
out << sep;
|
||||
llvm::ListSeparator equal(" == ");
|
||||
for (Nonnull<const Value*> value : eq->values) {
|
||||
out << equal << *value;
|
||||
out << equal << "`" << *value << "`";
|
||||
}
|
||||
}
|
||||
out << "\n";
|
||||
out << "]\n";
|
||||
if (parent_scope_) {
|
||||
out << **parent_scope_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user