hyperledger / solang

Solidity Compiler for Solana and Polkadot
https://solang.readthedocs.io/
Apache License 2.0
1.25k stars 208 forks source link

Solang does not check if value fits into `bytesN` #1532

Closed LucasSte closed 11 months ago

LucasSte commented 11 months ago
contract Test2 {
    address public a;
    address public b;

    constructor(address c, address d) {
        a = c;
        b = d;
        bytes1 g = 256;
    }
}

That contract works fine in Solang, but solc warns about Type int_const 256 is not implicitly convertible to expected type bytes1.