Solidity 0.8.26 introduce a new overload require(bool, Error) that allows usage of require functions with custom errors. This feature is available in the via-ir pipeline only.
Forge coverage doesn't recognize the require branches when using with custom error.
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (6179312 2024-06-10T00:18:46.177980000Z)
What command(s) is the bug in?
forge coverage --ir-minimum
Operating System
macOS (Apple Silicon)
Describe the bug
Solidity 0.8.26 introduce a new overload require(bool, Error) that allows usage of require functions with custom errors. This feature is available in the via-ir pipeline only.
Forge coverage doesn't recognize the
require
branches when using with custom error.