diff options
Index access for bytesXX.
Diffstat (limited to 'test/libsolidity/SolidityNameAndTypeResolution.cpp')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 820fd7d0..d202942c 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -3136,6 +3136,19 @@ BOOST_AUTO_TEST_CASE(conditional_with_all_types) BOOST_CHECK(success(text)); } +BOOST_AUTO_TEST_CASE(index_access_for_bytes) +{ + char const* text = R"( + contract C { + bytes20 x; + function f(bytes16 b) { + b[uint(x[2])]; + } + } + )"; + BOOST_CHECK(success(text)); +} + BOOST_AUTO_TEST_SUITE_END() } |