Only suggest removing parentheses from a construction call if they're empty

This commit is contained in:
Kamil Śliwak
2023-02-15 14:27:03 +01:00
parent 73183d3df9
commit 1a981af548
7 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -365,7 +365,7 @@ void TypeChecker::endVisit(InheritanceSpecifier const& _inheritance)
toString(arguments->size()) +
" arguments given but expected " +
toString(parameterTypes.size()) +
". Remove parentheses if you do not want to provide arguments here."
(arguments->size() == 0 ? ". Remove parentheses if you do not want to provide arguments here." : "")
);
}
for (size_t i = 0; i < std::min(arguments->size(), parameterTypes.size()); ++i)