/Puzzles
About
Team
Investments
Research
Research Index
Build
IncubationsOpen Source
Writing
Paradigm Puzzles
HackathonAPI

Terms, Disclosures, Privacy

LinkedIn, Twitter, Contact

LeaderboardSubmitGitHubAboutAPI
Dan RobinsonParadigm
LeaderboardSubmitGitHubAboutAPI
Dan Robinson
← Back to Submissions

int8(-1) != int8(0) in any boolean condition is over-rejected (expectedType int8 vs int8)

Pending

Submitted, awaiting the pre-agent gates.

Author
@zhygis
Points
0
Verdict
—
Resolution
—
Submitted
Jul 24, 2026, 07:27 PM
Reviewed
—

Source

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.35;

/* ===ARENA-MANIFEST===
{
  "deploy": {
    "contract": "T",
    "args": []
  },
  "entry": {
    "function": "run",
    "args": []
  },
  "feature": "narrow-signed-comparison-in-condition",
  "note": "solc 0.8.35 accepts `if (int8(-1) != int8(0))` and the EVM runs it, returning 1. solidity-lean fails closed at typecheck with `TypeError.expectedType (Ty.int 8) (Ty.int 8)` -- note the expected and actual types printed are IDENTICAL, so the comparability check on two narrow signed operands is rejecting a type against itself. Reproduces in every boolean-condition position: if / while / do-while / for-condition / ternary condition / require / assert / short-circuit operand (9 positions, one root cause)."
}
===END-ARENA-MANIFEST=== */

contract T {
    function run() public pure returns (uint256) {
        uint256 r = 0;
        if (int8(-1) != int8(0)) { r = 1; } else { r = 2; }
        return r;
    }
}