Enforcing error on msg.gas and block.blockhash()

This commit is contained in:
Leonardo Alt
2018-07-04 11:42:05 +02:00
parent 533d5d4b1c
commit 8202d512e0
9 changed files with 20 additions and 68 deletions
@@ -1,6 +1,6 @@
contract C {
function f() public pure {
bytes32 h = keccak256(abi.encodePacked(keccak256, f, this.f.gas, block.blockhash));
bytes32 h = keccak256(abi.encodePacked(keccak256, f, this.f.gas, blockhash));
h;
}
}
@@ -8,4 +8,4 @@ contract C {
// TypeError: (91-100): This type cannot be encoded.
// TypeError: (102-103): This type cannot be encoded.
// TypeError: (105-115): This type cannot be encoded.
// TypeError: (117-132): This type cannot be encoded.
// TypeError: (117-126): This type cannot be encoded.