Skip to content

Support function overloading in functions block #2589

@yizhang-yiz

Description

@yizhang-yiz

Summary:

Currently overloading function in functions{} causes parsing error. Fixing this provides better UI.

Description:

This doesn't work

functions {
  real foo(real[] y0);
  real foo(real[,] y0);
}
...

The fix is to have a single functor for foo which overloads operator().

Current Output:

Parse Error.  Function already declared, name=foo

Expected Output:

Parse successfully.

Current Version:

v2.18.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions