mirror of
https://github.com/paradigmxyz/solidity-lean.git
synced 2026-11-15 19:56:39 +00:00
The require-with-custom-error checker's member arm resolved the error callee's unqualified name only against the contract's flattened errors (checkCustomErrorArgs), then fell back to re-checking the whole require(...) as an ordinary expression -- where EL.Bad(a) resolves as a member function call and is rejected as unknownFunction "Bad". A library-declared error (revert L.Bad(a) already handled by checkRevertCall) was thus over-rejected in the require form, failing closed on an in-scope solc-accepted program. Mirror checkRevertCall's library arm: when the member callee's base is a typeName (Ty.user path), resolve the error against that named type's error table (contractErrorSig?) before the flattened-scope fallback. The executable lowering already lowers the member require-custom to requireCustom by the bare name, and the library qualifier is not part of the error selector, so the selector is soundly encoded. Witness: SolidCore.Witness.RequireLibraryQualifiedError (accepted + run()=>5). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
137 lines
5 KiB
137 lines
5 KiB