## Type Matching (Critical)

### Trigger Signals

- Function call argument count inconsistent with definition
- Function call argument type inconsistent with definition
- Variable assignment type inconsistent with declared type
- Function return value type inconsistent with declared return type
- Interface implementation signature inconsistent with interface definition

### Judgment Process

1. **Identify function calls**: `Read` extracts function calls in the changed code, marking call sites and arguments
2. **Verify parameter matching**: `find_definition` looks up the called function's definition, comparing:
   - Parameter count: how many arguments are passed at the call site vs. how many are required at the definition
   - Parameter types: whether actual argument types at the call site are compatible with formal parameter types at the definition (considering implicit conversions)
3. **Verify return types**: `find_definition` looks up the function definition, `Read` extracts all `return` statements, confirming return value types match the declaration
4. **Verify interface implementation**: `find_definition` looks up the interface definition, `find_references` finds implementing classes, `Read` compares whether method signatures fully match (parameter types, return types, optional parameters)

### Evidence Construction

After confirming a defect, the output must include:
- Call/assignment location (with file:line number)
- Definition location (function/interface definition, with file:line number)
- Mismatch details (expected type vs. actual type, expected parameter count vs. actual count)

### Exclusions

- Type checks already covered by TypeScript strict mode (compiler guarantee)
- Flexible calls with Python `Any` type (by design)
- Optional parameters not passed (function definition has default values for parameters)
- Method overloading (legal multi-signature)
- Parameter type validation for third-party library function calls (third-party dependencies are not visible, cannot confirm type definitions)
