diff options
author | Christian Parpart <christian@parpart.family> | 2018-06-06 17:15:22 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-14 07:24:43 +0800 |
commit | a211b8911885ded6ddcd4d7400994a85235fe8e4 (patch) | |
tree | de225bc1e0f6f0dc29ab7984088752106dbfe5cd /test/libsolidity/syntaxTests/specialFunctions | |
parent | 014bbc6c97a4abdf8eed5d0273d00c80308e355d (diff) | |
download | dexon-solidity-a211b8911885ded6ddcd4d7400994a85235fe8e4.tar.gz 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/specialFunctions')
-rw-r--r-- | test/libsolidity/syntaxTests/specialFunctions/types_with_unspecified_encoding_types.sol | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/libsolidity/syntaxTests/specialFunctions/types_with_unspecified_encoding_types.sol b/test/libsolidity/syntaxTests/specialFunctions/types_with_unspecified_encoding_types.sol index d10c1718..e46a9050 100644 --- a/test/libsolidity/syntaxTests/specialFunctions/types_with_unspecified_encoding_types.sol +++ b/test/libsolidity/syntaxTests/specialFunctions/types_with_unspecified_encoding_types.sol @@ -1,7 +1,7 @@ contract C { struct S { uint x; } S s; - struct T { } + struct T { uint y; } T t; enum A { X, Y } function f() public pure { @@ -9,9 +9,8 @@ contract C { } } // ---- -// Warning: (51-63): Defining empty structs is deprecated. -// TypeError: (168-169): This type cannot be encoded. -// TypeError: (171-172): This type cannot be encoded. +// TypeError: (176-177): This type cannot be encoded. // TypeError: (179-180): This type cannot be encoded. -// TypeError: (182-186): This type cannot be encoded. -// TypeError: (188-194): This type cannot be encoded. +// TypeError: (187-188): This type cannot be encoded. +// TypeError: (190-194): This type cannot be encoded. +// TypeError: (196-202): This type cannot be encoded. |