solang
solang copied to clipboard
Function type variable call failed.
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