Support equality on bytes(N)

This commit is contained in:
Ulf Norell
2019-04-25 16:06:50 +02:00
parent 386419f112
commit 8a381e5ef1
3 changed files with 38 additions and 5 deletions
+2 -1
View File
@@ -106,7 +106,8 @@ compilable_contracts() ->
"include",
"basic_auth",
"bitcoin_auth",
"address_literals"
"address_literals",
"bytes_equality"
].
%% Contracts that should produce type errors
+18
View File
@@ -0,0 +1,18 @@
contract BytesEquality =
function eq16(a : bytes(16), b) = a == b
function ne16(a : bytes(16), b) = a != b
function eq32(a : bytes(32), b) = a == b
function ne32(a : bytes(32), b) = a != b
function eq47(a : bytes(47), b) = a == b
function ne47(a : bytes(47), b) = a != b
function eq64(a : bytes(64), b) = a == b
function ne64(a : bytes(64), b) = a != b
function eq65(a : bytes(65), b) = a == b
function ne65(a : bytes(65), b) = a != b