mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow ambiguous conversions between number literals and bytesXX types.
This commit is contained in:
+1
-1
@@ -444,7 +444,7 @@ For example,
|
||||
pragma solidity >0.4.24;
|
||||
|
||||
contract Test {
|
||||
constructor() public { b = 0x12345678901234567890123456789012; }
|
||||
constructor() public { b = hex"12345678901234567890123456789012"; }
|
||||
event Event(uint indexed a, bytes32 b);
|
||||
event Event2(uint indexed a, bytes32 b);
|
||||
function foo(uint a) public { emit Event(a, b); }
|
||||
|
||||
Reference in New Issue
Block a user