bug fixes for script optimization intermediate forms

This commit is contained in:
Vern Paxson 2023-06-16 15:21:32 -07:00 committed by Arne Welzel
parent c0f3403714
commit 4a5a7f975d
5 changed files with 36 additions and 14 deletions

View file

@ -788,9 +788,12 @@ bool FuncType::CheckArgs(const std::vector<TypePtr>& args, bool is_init, bool do
if ( my_args.size() != args.size() )
{
if ( do_warn )
{
Warn(util::fmt("Wrong number of arguments for function. Expected %zu, got %zu.",
args.size(), my_args.size()));
const_cast<FuncType*>(this)->reported_error = true;
const_cast<FuncType*>(this)->reported_error = true;
}
return false;
}