diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-03-12 00:41:12 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-03-12 19:53:00 +0800 |
commit | f3fc870e03cef67d1a8acc4cf49df574f324212a (patch) | |
tree | 2f1ea8148f8c72fc86f5dd7b27a16b0e19ab2752 /SolidityNameAndTypeResolution.cpp | |
parent | 6e9d0d7345f06595b6890831e3cd80449b4d2201 (diff) | |
download | dexon-solidity-f3fc870e03cef67d1a8acc4cf49df574f324212a.tar.gz dexon-solidity-f3fc870e03cef67d1a8acc4cf49df574f324212a.tar.zst dexon-solidity-f3fc870e03cef67d1a8acc4cf49df574f324212a.zip |
byte is now an alias for byte1
Diffstat (limited to 'SolidityNameAndTypeResolution.cpp')
-rw-r--r-- | SolidityNameAndTypeResolution.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/SolidityNameAndTypeResolution.cpp b/SolidityNameAndTypeResolution.cpp index a73c937f..99a1a8bc 100644 --- a/SolidityNameAndTypeResolution.cpp +++ b/SolidityNameAndTypeResolution.cpp @@ -1393,6 +1393,16 @@ BOOST_AUTO_TEST_CASE(test_fromElementaryTypeName) BOOST_CHECK(*Type::fromElementaryTypeName(Token::Bytes32) == *make_shared<FixedBytesType>(32)); } +BOOST_AUTO_TEST_CASE(test_byte_is_alias_of_byte1) +{ + char const* text = R"( + contract c { + bytes arr; + function f() { byte a = arr[0];} + })"; + ETH_TEST_REQUIRE_NO_THROW(parseTextAndResolveNames(text), "Type resolving failed"); +} + BOOST_AUTO_TEST_SUITE_END() } |