aboutsummaryrefslogtreecommitdiffstats
path: root/SolidityNameAndTypeResolution.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-03-12 00:41:12 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-03-12 19:53:00 +0800
commitf3fc870e03cef67d1a8acc4cf49df574f324212a (patch)
tree2f1ea8148f8c72fc86f5dd7b27a16b0e19ab2752 /SolidityNameAndTypeResolution.cpp
parent6e9d0d7345f06595b6890831e3cd80449b4d2201 (diff)
downloaddexon-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.cpp10
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()
}