aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-03-30 19:58:35 +0800
committerGitHub <noreply@github.com>2018-03-30 19:58:35 +0800
commit326d656a552ca247b5c96f1921c9c4c828ce93ad (patch)
tree0d03f9f5a347a051757e1d35f182eff782228e05 /test/libsolidity/syntaxTests
parent58c57e446b65b31d8c4573d506c879fe385a51d7 (diff)
parentebb12756adfe95ae694ed7e141890c6d47e8b7b4 (diff)
downloaddexon-solidity-326d656a552ca247b5c96f1921c9c4c828ce93ad.tar
dexon-solidity-326d656a552ca247b5c96f1921c9c4c828ce93ad.tar.gz
dexon-solidity-326d656a552ca247b5c96f1921c9c4c828ce93ad.tar.bz2
dexon-solidity-326d656a552ca247b5c96f1921c9c4c828ce93ad.tar.lz
dexon-solidity-326d656a552ca247b5c96f1921c9c4c828ce93ad.tar.xz
dexon-solidity-326d656a552ca247b5c96f1921c9c4c828ce93ad.tar.zst
dexon-solidity-326d656a552ca247b5c96f1921c9c4c828ce93ad.zip
Merge pull request #3790 from ethereum/empty-structs
Disallow empty structs
Diffstat (limited to 'test/libsolidity/syntaxTests')
-rw-r--r--test/libsolidity/syntaxTests/empty_struct.sol5
-rw-r--r--test/libsolidity/syntaxTests/empty_struct_050.sol6
2 files changed, 11 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/empty_struct.sol b/test/libsolidity/syntaxTests/empty_struct.sol
new file mode 100644
index 00000000..dcced618
--- /dev/null
+++ b/test/libsolidity/syntaxTests/empty_struct.sol
@@ -0,0 +1,5 @@
+contract test {
+ struct A {}
+}
+// ----
+// Warning: Defining empty structs is deprecated.
diff --git a/test/libsolidity/syntaxTests/empty_struct_050.sol b/test/libsolidity/syntaxTests/empty_struct_050.sol
new file mode 100644
index 00000000..dbec93c4
--- /dev/null
+++ b/test/libsolidity/syntaxTests/empty_struct_050.sol
@@ -0,0 +1,6 @@
+pragma experimental "v0.5.0";
+contract test {
+ struct A {}
+}
+// ----
+// SyntaxError: Defining empty structs is disallowed.