aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/empty_string_var.sol
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-04-30 19:58:33 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-04-30 20:02:02 +0800
commitc44294d02ddfca52bc93c33593b18e2f91b1f167 (patch)
treeadf861143d22450bd22bde4f707a172f487d804d /test/libsolidity/syntaxTests/empty_string_var.sol
parente0b178e1c51fad4c405e79e1661a6e4692f17ee8 (diff)
downloaddexon-solidity-c44294d02ddfca52bc93c33593b18e2f91b1f167.tar.gz
dexon-solidity-c44294d02ddfca52bc93c33593b18e2f91b1f167.tar.zst
dexon-solidity-c44294d02ddfca52bc93c33593b18e2f91b1f167.zip
Add syntax tests for bytesM
Diffstat (limited to 'test/libsolidity/syntaxTests/empty_string_var.sol')
-rw-r--r--test/libsolidity/syntaxTests/empty_string_var.sol11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/empty_string_var.sol b/test/libsolidity/syntaxTests/empty_string_var.sol
new file mode 100644
index 00000000..e9837590
--- /dev/null
+++ b/test/libsolidity/syntaxTests/empty_string_var.sol
@@ -0,0 +1,11 @@
+contract C {
+ function f() {
+ var a = "";
+ bytes1 b = bytes1(a);
+ bytes memory c = bytes(a);
+ string memory d = string(a);
+ }
+}
+// ----
+// Warning: (34-39): Use of the "var" keyword is deprecated.
+// TypeError: (61-70): Explicit type conversion not allowed from "string memory" to "bytes1".