aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/nameAndTypeResolution/419_interface_structs.sol
diff options
context:
space:
mode:
authorChristian Parpart <christian@parpart.family>2018-06-06 17:15:22 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-06-14 07:24:43 +0800
commita211b8911885ded6ddcd4d7400994a85235fe8e4 (patch)
treede225bc1e0f6f0dc29ab7984088752106dbfe5cd /test/libsolidity/syntaxTests/nameAndTypeResolution/419_interface_structs.sol
parent014bbc6c97a4abdf8eed5d0273d00c80308e355d (diff)
downloaddexon-solidity-a211b8911885ded6ddcd4d7400994a85235fe8e4.tar
dexon-solidity-a211b8911885ded6ddcd4d7400994a85235fe8e4.tar.gz
dexon-solidity-a211b8911885ded6ddcd4d7400994a85235fe8e4.tar.bz2
dexon-solidity-a211b8911885ded6ddcd4d7400994a85235fe8e4.tar.lz
dexon-solidity-a211b8911885ded6ddcd4d7400994a85235fe8e4.tar.xz
dexon-solidity-a211b8911885ded6ddcd4d7400994a85235fe8e4.tar.zst
dexon-solidity-a211b8911885ded6ddcd4d7400994a85235fe8e4.zip
Enforce disallowing empty structs
This patch enfoces an error when it encounters an empty struct, effectively eliminating the deprecation warning. Also adjust 419_interface_structs to explicitely test for (non-empty) structs, as this behaviour "may" change in the future.
Diffstat (limited to 'test/libsolidity/syntaxTests/nameAndTypeResolution/419_interface_structs.sol')
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/419_interface_structs.sol6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/419_interface_structs.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/419_interface_structs.sol
index 2afef06c..c74d52d3 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/419_interface_structs.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/419_interface_structs.sol
@@ -1,7 +1,9 @@
interface I {
struct A {
+ // This is currently expected to break, but it *may* change in the future.
+ int dummy;
}
}
// ----
-// Warning: (18-34): Defining empty structs is deprecated.
-// TypeError: (18-34): Structs cannot be defined in interfaces.
+// TypeError: (18-136): Structs cannot be defined in interfaces.
+// TypeError: (120-129): Variables cannot be declared in interfaces.