mirror of
https://github.com/paradigmxyz/solidity-lean.git
synced 2026-11-15 19:56:39 +00:00
The reason argument of require(cond, reason) / revert(reason) is a value-use boundary: its CONTENTS are ABI-encoded into Error(string). A bare state string/bytes lowers to Expr.storage key (the header word), so asBytes? on that Value.word returned none -> RevertData.typeMismatch = Panic(0), diverging from solc+EVM which reverts Error(<contents>). Wrap the reason core with materializeStorageValueUseCore at every requireErrorExpr/revertErrorExpr reason-arg lowering site (effect-position generic arm, internal-call cond arm, main statement arm, and revert-reason arm). Every non-storage reason core passes through untouched. Witness: SolidCore/Witness/RequireReasonStorageString.lean, run() => revert|error:not allowed here. Co-authored-by: Lean Semantics Review Agent <agent@solidcore.local> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
133 lines
4.7 KiB
133 lines
4.7 KiB