mirror of
https://github.com/paradigmxyz/solidity-lean.git
synced 2026-11-15 19:56:39 +00:00
Writing a single byte through a bytes(...) reinterpret of a *storage* string lvalue (bytes(s)[0] = 0x41) peels to a storage index write over a StorageLayout.string field. Both storage index-write dispatchers (Runtime.storeStorageIndex and ...WithDeepClear) hard-rejected the string layout with RevertData.typeMismatch = Panic(0), so solidity-lean reverted where solc+EVM succeeds (returns 65, slot 0 = "Abc"). string and bytes share an identical length-prefixed storage layout, and a direct s[i] = v on a string is rejected by the typechecker, so a string field reaches byte-write dispatch ONLY via the bytes(s) reinterpret. Treat it exactly like a bytes field (storeStorageByteAt). Adds witness BytesOfStringStorageByteWrite. Co-authored-by: Lean Semantics Review Agent <agent@solidcore.local> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
120 lines
4.2 KiB
120 lines
4.2 KiB