From 3eedbc6a9c60888dd967d6673a34511947da4aa1 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 10 Apr 2018 11:22:26 +0200 Subject: Error when using no parentheses in modifier-style constructor calls. --- .../inheritance/allow_empty_duplicated_super_constructor_call.sol | 3 +-- .../inheritance/disallow_modifier_style_without_parentheses.sol | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 test/libsolidity/syntaxTests/inheritance/disallow_modifier_style_without_parentheses.sol (limited to 'test/libsolidity/syntaxTests/inheritance') diff --git a/test/libsolidity/syntaxTests/inheritance/allow_empty_duplicated_super_constructor_call.sol b/test/libsolidity/syntaxTests/inheritance/allow_empty_duplicated_super_constructor_call.sol index 1f580b1d..ce9d5f5f 100644 --- a/test/libsolidity/syntaxTests/inheritance/allow_empty_duplicated_super_constructor_call.sol +++ b/test/libsolidity/syntaxTests/inheritance/allow_empty_duplicated_super_constructor_call.sol @@ -1,3 +1,2 @@ contract A { constructor() public { } } -contract B1 is A { constructor() A() public { } } -contract B2 is A { constructor() A public { } } +contract B is A { constructor() A() public { } } diff --git a/test/libsolidity/syntaxTests/inheritance/disallow_modifier_style_without_parentheses.sol b/test/libsolidity/syntaxTests/inheritance/disallow_modifier_style_without_parentheses.sol new file mode 100644 index 00000000..0c159a22 --- /dev/null +++ b/test/libsolidity/syntaxTests/inheritance/disallow_modifier_style_without_parentheses.sol @@ -0,0 +1,4 @@ +contract A { constructor() public { } } +contract B is A { constructor() A public { } } +// ---- +// Warning: Modifier-style base constructor call without arguments. -- cgit