Skip to content

Commit

Permalink
re-enable pretty-printing of fn types (see #48)
Browse files Browse the repository at this point in the history
  • Loading branch information
leissa committed Feb 21, 2017
1 parent 92c6536 commit 907a8eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/impala/sema/type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ std::ostream& NoRetType::stream(std::ostream& os) const { return os << "<no-retu

std::ostream& FnType::stream(std::ostream& os) const {
os << "fn";
//auto ret_type = return_type();
//if (ret_type->isa<NoRetType>())
auto ret_type = return_type();
if (ret_type->isa<NoRetType>())
return stream_list(os, ops(), [&](const Type* type) { os << type; }, "(", ")");

//return streamf(os, "({}) -> {}", stream_list(ops().skip_back(), [&](const Type* type) { os << type; }), ret_type);
return streamf(os, "({}) -> {}", stream_list(ops().skip_back(), [&](const Type* type) { os << type; }), ret_type);
}

std::ostream& Var::stream(std::ostream& os) const {
Expand Down

0 comments on commit 907a8eb

Please sign in to comment.