Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle overload functions #1185

Merged
merged 4 commits into from
Nov 23, 2017
Merged

Handle overload functions #1185

merged 4 commits into from
Nov 23, 2017

Conversation

jbaylina
Copy link
Contributor

This PR tries all the functions until it finds a one that matches the number of parameters.

Solves #924

@coveralls
Copy link

coveralls commented Nov 19, 2017

Coverage Status

Coverage increased (+0.02%) to 85.588% when pulling 4bc4eee on jbaylina:overload_functions into eda3f5e on ethereum:1.0.

@frozeman
Copy link
Contributor

This is definitely a useful fix, thought because of this reason there is also the function signature as well as the function name. As even with this fix, we have the problem there can be overloaded functions with the same parameter amount, just different types.

var cascadeFunc = _this._createTxObject.bind({
method: method,
parent: _this,
next: _this.methods[method.name]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we please rename this to: next -> nextMethod

btw we have the same issue for events :0

@coveralls
Copy link

coveralls commented Nov 20, 2017

Coverage Status

Coverage increased (+0.02%) to 85.588% when pulling b108e94 on jbaylina:overload_functions into c4c92c3 on ethereum:1.0.

@coveralls
Copy link

coveralls commented Nov 20, 2017

Coverage Status

Coverage increased (+0.02%) to 85.588% when pulling d4d0f66 on jbaylina:overload_functions into c4c92c3 on ethereum:1.0.

@frozeman frozeman merged commit d19f889 into web3:1.0 Nov 23, 2017
nachomazzara pushed a commit to nachomazzara/web3.js that referenced this pull request Jun 4, 2020
* Handle overload functions

* next -> nextMethod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants