Static Analyzer for Solidity
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
slither/tests/ast-parsing/custom_error_with_state_var...

22 lines
557 B

// This test check our custom error lookup
// Which require a strict order of logic
// As _find_top_level require custom error
// To be parsed when they the function reaches
// the custom error lookup
// See https://github.com/crytic/slither/issues/1115
error ErrorWithParam(uint256 value);
uint256 constant ONE = 1;
uint256 constant TWO = ONE + 1;
function foo() pure { revert ErrorWithParam(0); }
library CustomErrors {
error LibraryError();
}
contract Bar {
function baz() external {
revert CustomErrors.LibraryError();
}
}