Nicer error message for private payable functions

This commit is contained in:
Alex Beregszaszi
2020-07-14 14:38:12 +01:00
parent 526e7b878b
commit eab12ecf77
3 changed files with 3 additions and 3 deletions
@@ -2,4 +2,4 @@ contract test {
function f() payable internal {}
}
// ----
// TypeError 5587: (20-52): Internal functions cannot be payable.
// TypeError 5587: (20-52): "internal" and "private" functions cannot be payable.
@@ -2,4 +2,4 @@ contract test {
function f() payable private {}
}
// ----
// TypeError 5587: (20-51): Internal functions cannot be payable.
// TypeError 5587: (20-51): "internal" and "private" functions cannot be payable.