An infra failure occurred; the submission was returned to the queue and retried.
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.35;
/* ===ARENA-MANIFEST===
{
"deploy": {
"contract": "T",
"args": []
},
"entry": {
"function": "run",
"args": []
},
"feature": "assignment-rhs-new-string-narrow-length",
"note": "solc 0.8.35 evaluates the uint8 allocation-length addition at uint8 width and panics 0x11. solidity-lean executes the assignment RHS without that width context and returns 256."
}
===END-ARENA-MANIFEST=== */
contract T {
function run() external pure returns (uint256) {
uint8 a = type(uint8).max;
string memory s;
s = new string(a + 1);
return bytes(s).length;
}
}