aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-03-13 00:31:39 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-03-13 00:31:39 +0800
commit039b133c180b15863ee3104637c97822d815d932 (patch)
treecff3931734c89fc16df19ffb4dd5db75d5d4eb75 /Types.cpp
parenta62d3fa24060016f7c1faaa2ab211d692a2b6359 (diff)
downloaddexon-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.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/Types.cpp b/Types.cpp
index 22e9dfb8..bd55e2a8 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -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)}});