aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/indexing/fixedbytes_negative_index.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/indexing/fixedbytes_negative_index.sol')
-rw-r--r--test/libsolidity/syntaxTests/indexing/fixedbytes_negative_index.sol9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/indexing/fixedbytes_negative_index.sol b/test/libsolidity/syntaxTests/indexing/fixedbytes_negative_index.sol
new file mode 100644
index 00000000..12399317
--- /dev/null
+++ b/test/libsolidity/syntaxTests/indexing/fixedbytes_negative_index.sol
@@ -0,0 +1,9 @@
+contract C {
+ function f() public {
+ bytes32 b;
+ b[-1];
+ }
+}
+// ----
+// TypeError: (58-60): Type int_const -1 is not implicitly convertible to expected type uint256.
+// TypeError: (56-61): Index expression cannot be represented as an unsigned integer.