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

Function lookup doesn't work with overloading #12409

Closed
lukehutch opened this issue Dec 15, 2021 · 1 comment
Closed

Function lookup doesn't work with overloading #12409

lukehutch opened this issue Dec 15, 2021 · 1 comment
Labels
language design :rage4: Any changes to the language, e.g. new features

Comments

@lukehutch
Copy link
Contributor

lukehutch commented Dec 15, 2021

Description

If trying to look up an overloaded function, e.g. transfer which is defined both as transfer(address,uint256) (ERC20) and transfer(address,uint256,bytes) (ERC223), then Solidity gives a warning:

// TypeError: Member "transfer" not unique after argument-dependent lookup in contract
this.transfer.selector

It would be great if it were possible to look up functions based on parameter types:

this.transfer(address,uint256).selector

Environment

  • Compiler version: 0.8.10
  • Target EVM version (as per compiler settings): default
  • Framework/IDE (e.g. Truffle or Remix): Remix
  • EVM execution environment / backend / blockchain client:
  • Operating system: Linux

Steps to Reproduce

As above

@ekpyron
Copy link
Member

ekpyron commented Aug 12, 2022

Closing this as a duplicate of #3556

@ekpyron ekpyron closed this as completed Aug 12, 2022
Repository owner moved this from Triage to Done in Solidity Focus Board Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language design :rage4: Any changes to the language, e.g. new features
Projects
Archived in project
Development

No branches or pull requests

3 participants