mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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.
This commit is contained in:
committed by
Alex Beregszaszi
parent
014bbc6c97
commit
a211b89118
@@ -1271,7 +1271,6 @@ BOOST_AUTO_TEST_CASE(deleteStruct)
|
||||
contract test {
|
||||
struct topStruct {
|
||||
nestedStruct nstr;
|
||||
emptyStruct empty;
|
||||
uint topValue;
|
||||
mapping (uint => uint) topMapping;
|
||||
}
|
||||
@@ -1281,8 +1280,6 @@ BOOST_AUTO_TEST_CASE(deleteStruct)
|
||||
uint nestedValue;
|
||||
mapping (uint => bool) nestedMapping;
|
||||
}
|
||||
struct emptyStruct{
|
||||
}
|
||||
function test(){
|
||||
toDelete = 5;
|
||||
str.topValue = 1;
|
||||
|
||||
Reference in New Issue
Block a user