Type check Bytes.to_X builtins

This commit is contained in:
Ulf Norell
2019-06-24 11:44:07 +02:00
parent 2e0c44862c
commit 6612c29758
5 changed files with 75 additions and 17 deletions
+8
View File
@@ -0,0 +1,8 @@
contract BytesToX =
function to_int(b : bytes(42)) : int = Bytes.to_int(b)
function to_str(b : bytes(12)) : string =
String.concat(Bytes.to_str(b), Bytes.to_str(#ffff))
function to_str_big(b : bytes(65)) : string =
Bytes.to_str(b)