Code has been added to clipboard!
Fixed Size Bytes Array in Solidity
Example
bytes2 a = 54321; // not allowed
bytes2 b = 0x12; // not allowed
bytes2 c = 0x123; // not allowed
bytes2 d = 0x1234; // works
bytes2 e = 0x0012; // works
bytes4 f = 0; // works
bytes4 g = 0x0; // works