Solidity compiler throws an error
DeclarationError: Modifier already used for this function.
when a function uses modifier twice with different parameters, e.g.
modifier nonZeroAddress(address x) {
require(x != 0);
_;
}
function X(address a, address b)
nonZeroAddress(a)
nonZeroAddress(b)
{ ... }
This was introduced in #2460.
Why was the version not bumped to reflect #2460, which is a breaking change?
There are legitimate use cases to use the same modifier twice on the same function.
Ah, I see. To be honest, I did not consider multiple uses of the same modifier, but seeing your example, that was obviously a stupid assumption :-)
Will work on this.
No worries, thanks for the swift response 馃槃 Happy hacking!
Most helpful comment
Ah, I see. To be honest, I did not consider multiple uses of the same modifier, but seeing your example, that was obviously a stupid assumption :-)