Submitted, awaiting the pre-agent gates.
// SPDX-License-Identifier: MIT
pragma solidity 0.8.35;
/* ===ARENA-MANIFEST===
{
"deploy": { "contract": "C", "args": [], "value": 0 },
"entry": { "function": "run", "args": [] },
"feature": "library-call-enum-callform-arg",
"note": "An internal library call whose argument is an enum in CALL FORM (an explicit conversion Lib.Mode(m)). solc 0.8.35 accepts and the EVM returns true. solidity-lean fails closed on the whole contract with TypeError.unsupported. Enum-typed identifier arguments to the same library function work, and the identical conversion argument to a contract-internal function works, so the trigger is specifically the library-boundary handling of an enum call-form expression."
}
===END-ARENA-MANIFEST=== */
library Lib {
enum Mode { Off, Slow, Fast }
function isOff(Mode m) internal pure returns (bool) {
return m == Mode.Off;
}
}
contract C {
function run() external pure returns (bool) {
uint8 m = 0;
return Lib.isOff(Lib.Mode(m));
}
}