aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-08-01 20:18:37 +0800
committerGitHub <noreply@github.com>2018-08-01 20:18:37 +0800
commitce99a5ce7f98b3dfb86ea8397a5117332af33f2a (patch)
tree3f3ca4b90842e03951ae0324a1af96ab9d5f7b2c /test
parent8d05770e59dd4c383cdcd5f67d2a455be3b09ae1 (diff)
parent061ea0cfc6b8a7a0950e9764876733391eac6b81 (diff)
downloaddexon-solidity-ce99a5ce7f98b3dfb86ea8397a5117332af33f2a.tar
dexon-solidity-ce99a5ce7f98b3dfb86ea8397a5117332af33f2a.tar.gz
dexon-solidity-ce99a5ce7f98b3dfb86ea8397a5117332af33f2a.tar.bz2
dexon-solidity-ce99a5ce7f98b3dfb86ea8397a5117332af33f2a.tar.lz
dexon-solidity-ce99a5ce7f98b3dfb86ea8397a5117332af33f2a.tar.xz
dexon-solidity-ce99a5ce7f98b3dfb86ea8397a5117332af33f2a.tar.zst
dexon-solidity-ce99a5ce7f98b3dfb86ea8397a5117332af33f2a.zip
Merge pull request #4378 from ethereum/noBaseWithoutArguments
[BREAKING] Disallow calling base constructors without arguments.
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/syntaxTests/inheritance/disallow_modifier_style_without_parentheses.sol2
-rw-r--r--test/libsolidity/syntaxTests/inheritance/modifiers_in_constructor_context.sol9
2 files changed, 10 insertions, 1 deletions
diff --git a/test/libsolidity/syntaxTests/inheritance/disallow_modifier_style_without_parentheses.sol b/test/libsolidity/syntaxTests/inheritance/disallow_modifier_style_without_parentheses.sol
index 6cf68d2a..8f5ceef8 100644
--- a/test/libsolidity/syntaxTests/inheritance/disallow_modifier_style_without_parentheses.sol
+++ b/test/libsolidity/syntaxTests/inheritance/disallow_modifier_style_without_parentheses.sol
@@ -1,4 +1,4 @@
contract A { constructor() public { } }
contract B is A { constructor() A public { } }
// ----
-// Warning: (72-73): Modifier-style base constructor call without arguments.
+// DeclarationError: (72-73): Modifier-style base constructor call without arguments.
diff --git a/test/libsolidity/syntaxTests/inheritance/modifiers_in_constructor_context.sol b/test/libsolidity/syntaxTests/inheritance/modifiers_in_constructor_context.sol
new file mode 100644
index 00000000..d8ce0e48
--- /dev/null
+++ b/test/libsolidity/syntaxTests/inheritance/modifiers_in_constructor_context.sol
@@ -0,0 +1,9 @@
+// This generated an invalid warning on m1 in some compiler versions.
+contract A {
+ constructor() m1 public { }
+ modifier m1 { _; }
+}
+contract B is A {
+ modifier m2 { _; }
+ constructor() A() m1 m2 public { }
+}