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

Reversing the order of two in-contract functions causes two different error messages #15565

Open
haoyang9804 opened this issue Nov 4, 2024 · 0 comments
Labels

Comments

@haoyang9804
Copy link
Contributor

Description

The following test program causes a Member "func27" not found or not visible after argument-dependent lookup in contract contract19.

contract contract19 {
  mapping(int64 => mapping(int64 => int64)) internal mapping37;
  function func26() external view {
    this.func27(mapping37);
  }
  function func27(mapping(int64 => mapping(int64 => int64)) memory mapping28) external view {

  }
}

The following test program switches the order of func26 and func27, and it triggers Types containing (nested) mappings can only be parameters or return variables of internal or library functions.

contract contract19 {
  mapping(int64 => mapping(int64 => int64)) internal mapping37;
  function func27(mapping(int64 => mapping(int64 => int64)) memory mapping28) external view {

  }
  function func26() external view {
    this.func27(mapping37);
  }
}

I think the second error message is correct.

Environment

  • Compiler version: 0.8.28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant