aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/empty_string_var.sol
diff options
context:
space:
mode:
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".