solang
solang copied to clipboard
Tuple assignment causes compilation error.
Version: v0.3.3: Atlantis Description: After the assignment (m[0], m[1], m[2]) = (1, x, 3);, returning m[0]; causes an error. However, m[0] = 1 works fine.
contract C {
uint public x = 17;
function g() public returns (uint a) {
uint256[3] memory m;
// m[0]=1;
(m[0], m[1], m[2]) = (1, x, 3);
return m[0];
}
}
solang compile --target solana test.sol
thread 'main' panicked at 'Found IntValue(IntValue { int_value: Value { name: "", address: 0x59f8cf321f00, is_const: true, is_null: false, is_undef: false, llvm_value: "i256 1", llvm_type: "i256" } }) but expected PointerValue variant', /github/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/inkwell-0.2.0/src/values/enums.rs:302:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace