sway
sway copied to clipboard
Internal compiler error: Verification failed: Type mismatch found for call to 'push_21': u64 is not a u256.#
Forc: 0.61.2
contract;
abi MyContract {
fn test() -> Vec<u256>;
}
impl MyContract for Contract {
fn test() -> Vec<u256> {
let mut prices = Vec::with_capacity(1);
prices.push(42); // 42 is typed as u64, does not get coerced into u256
prices
}
}
Note: this error prints the entire assembly of the contract as well.