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 type variable call failed. #1742

Open
Subway2023 opened this issue Feb 11, 2025 · 0 comments
Open

Function type variable call failed. #1742

Subway2023 opened this issue Feb 11, 2025 · 0 comments

Comments

@Subway2023
Copy link

Version: v0.3.3: Atlantis

contract C {
    function g(string calldata) external returns (bool) { return true; }

    function main() external returns (bool) {
        function (string memory) external returns (bool) ptr = this.g;
        return ptr("testString");
    }
}

Reproduction: I set up a Solang compilation and execution environment to test the program.

solang/target/debug/vmRunNoPara test.sol C main

The execution error is as follows:

Contract name: C
function new for AmL8rQygnxEpkJ5eiNXcYYYHxGqKsZen5ZChA6Vp7LZr
input: 872ccdc6190148bc
running bpf with calldata:872ccdc6190148bc
program: AmL8rQygnxEpkJ5eiNXcYYYHxGqKsZen5ZChA6Vp7LZr
static: length:0 
offset:20 prev:10 next:10 length:0 allocated:0 
thread 'main' panicked at src/tests/solana.rs:1778:52:
account 'systemProgram' is missing
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
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

No branches or pull requests

1 participant