[torque] Fix Signature printing
The operator<< for Signature objects in Torque incorrectly counted the number of named parameters instead of the total number of parameters when displaying them. This would cause the displayed signature to be "()" when no parameters were named, instead of the actual signature. Change-Id: I32572da5f5a378b71749515d89429172129bbcb9 Reviewed-on: https://chromium-review.googlesource.com/1104172 Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Théotime Grohens <theotime@google.com> Cr-Commit-Position: refs/heads/master@{#53792}
This commit is contained in:
parent
fffa33179d
commit
6e47d31fca
@ -150,7 +150,7 @@ std::string UnionType::GetGeneratedTNodeTypeName() const {
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const Signature& sig) {
|
||||
os << "(";
|
||||
for (size_t i = 0; i < sig.parameter_names.size(); ++i) {
|
||||
for (size_t i = 0; i < sig.parameter_types.types.size(); ++i) {
|
||||
if (i > 0) os << ", ";
|
||||
if (!sig.parameter_names.empty()) os << sig.parameter_names[i] << ": ";
|
||||
os << sig.parameter_types.types[i];
|
||||
|
Loading…
Reference in New Issue
Block a user