Submitted, awaiting the pre-agent gates.
// SPDX-License-Identifier: MIT
pragma solidity 0.8.35;
/* ===ARENA-MANIFEST===
{
"deploy": { "contract": "Derived", "args": [], "value": 0 },
"entry": { "function": "run", "args": [] },
"note": "qualified modifier invocation: solc uses Base.m and returns 1; Lean incorrectly virtually dispatches to Derived.m and returns 2"
}
===END-ARENA-MANIFEST=== */
contract Base {
uint256 internal value;
modifier m() virtual {
value = 1;
_;
}
}
contract Derived is Base {
modifier m() override {
value = 2;
_;
}
function run() external Base.m returns (uint256) {
return value;
}
}