Skip to main content

Conflicting Inheritance

What it detects

Contracts that inherit from multiple parents can override the same functions in unexpected ways. This detector checks for ambiguous or conflicting method definitions where the final behavior might not match developer intent.

Typical symptoms

  • Compiler warnings about overridden functions
  • Functions from different parents share the same signature

Solidity snippet (v0.8.25)

pragma solidity ^0.8.25;

contract A {
function foo() public virtual {}
}

contract B {
function foo() public virtual {}
}

contract C is A, B {
// Which foo() is used may be unclear
}

Why it matters on EVM

Conflicting inheritance can hide critical logic or lead to unexpected execution paths. Attackers might exploit overlooked overrides to bypass security checks.