sway icon indicating copy to clipboard operation
sway copied to clipboard

Internal compiler error: Verification failed: Type mismatch found for call to 'push_21': u64 is not a u256.#

Open Braqzen opened this issue 1 year ago • 0 comments

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.

Braqzen avatar Aug 14 '24 16:08 Braqzen