From b540ba527a70df440299de9c0bf44f9d11ac6ef6 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 27 Mar 2018 14:38:28 +0100 Subject: Disallow empty structs --- test/libsolidity/syntaxTests/empty_struct.sol | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 test/libsolidity/syntaxTests/empty_struct.sol (limited to 'test/libsolidity/syntaxTests/empty_struct.sol') diff --git a/test/libsolidity/syntaxTests/empty_struct.sol b/test/libsolidity/syntaxTests/empty_struct.sol new file mode 100644 index 00000000..87bc2ffe --- /dev/null +++ b/test/libsolidity/syntaxTests/empty_struct.sol @@ -0,0 +1,5 @@ +contract test { + struct A {} +} +// ---- +// SyntaxError: Defining empty structs is disallowed. -- cgit v1.2.3 From ebb12756adfe95ae694ed7e141890c6d47e8b7b4 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 27 Mar 2018 15:00:33 +0100 Subject: Still allow empty structs for non-0.5.0 mode --- test/libsolidity/syntaxTests/empty_struct.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/libsolidity/syntaxTests/empty_struct.sol') diff --git a/test/libsolidity/syntaxTests/empty_struct.sol b/test/libsolidity/syntaxTests/empty_struct.sol index 87bc2ffe..dcced618 100644 --- a/test/libsolidity/syntaxTests/empty_struct.sol +++ b/test/libsolidity/syntaxTests/empty_struct.sol @@ -2,4 +2,4 @@ contract test { struct A {} } // ---- -// SyntaxError: Defining empty structs is disallowed. +// Warning: Defining empty structs is deprecated. -- cgit v1.2.3 From f03695731b9b36cd4014620b7b63556a69b4e952 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Fri, 6 Apr 2018 18:37:01 +0200 Subject: Add source locations to syntax test expectations. --- test/libsolidity/syntaxTests/empty_struct.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/libsolidity/syntaxTests/empty_struct.sol') diff --git a/test/libsolidity/syntaxTests/empty_struct.sol b/test/libsolidity/syntaxTests/empty_struct.sol index dcced618..12655309 100644 --- a/test/libsolidity/syntaxTests/empty_struct.sol +++ b/test/libsolidity/syntaxTests/empty_struct.sol @@ -2,4 +2,4 @@ contract test { struct A {} } // ---- -// Warning: Defining empty structs is deprecated. +// Warning: (17-28): Defining empty structs is deprecated. -- cgit v1.2.3