diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-03-13 00:31:39 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-03-13 00:31:39 +0800 |
commit | 039b133c180b15863ee3104637c97822d815d932 (patch) | |
tree | cff3931734c89fc16df19ffb4dd5db75d5d4eb75 /Types.cpp | |
parent | a62d3fa24060016f7c1faaa2ab211d692a2b6359 (diff) | |
download | dexon-solidity-039b133c180b15863ee3104637c97822d815d932.tar.gz dexon-solidity-039b133c180b15863ee3104637c97822d815d932.tar.zst dexon-solidity-039b133c180b15863ee3104637c97822d815d932.zip |
Small FixedBytes type fixes
- Integer Constant is explicitly convertible to FixedBytes, so using
that in the tests
Diffstat (limited to 'Types.cpp')
-rw-r--r-- | Types.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -191,13 +191,10 @@ TypePointer IntegerType::unaryOperatorResult(Token::Value _operator) const // no further unary operators for addresses else if (isAddress()) return TypePointer(); - // "~" is ok for all other types - else if (_operator == Token::BitNot) - return shared_from_this(); // for non-address integers, we allow +, -, ++ and -- else if (_operator == Token::Add || _operator == Token::Sub || _operator == Token::Inc || _operator == Token::Dec || - _operator == Token::After) + _operator == Token::After || _operator == Token::BitNot) return shared_from_this(); else return TypePointer(); @@ -1154,7 +1151,7 @@ MagicType::MagicType(MagicType::Kind _kind): case Kind::Block: m_members = MemberList({{"coinbase", make_shared<IntegerType>(0, IntegerType::Modifier::Address)}, {"timestamp", make_shared<IntegerType>(256)}, - {"blockhash", make_shared<FunctionType>(strings{"uint"}, strings{"bytes"}, FunctionType::Location::BlockHash)}, + {"blockhash", make_shared<FunctionType>(strings{"uint"}, strings{"bytes32"}, FunctionType::Location::BlockHash)}, {"difficulty", make_shared<IntegerType>(256)}, {"number", make_shared<IntegerType>(256)}, {"gaslimit", make_shared<IntegerType>(256)}}); |