ruff/crates/red_knot_python_semantic/resources
David Peter af988bf866
[red-knot] Detect division-by-zero in unions and intersections (#17157)
## Summary

With this PR, we emit a diagnostic for this case where
previously didn't:
```py
from typing import Literal

def f(m: int, n: Literal[-1, 0, 1]):
    # error: [division-by-zero] "Cannot divide object of type `int` by zero"
    return m / n
```

## Test Plan

New Markdown test
2025-04-02 18:21:27 +02:00
..
mdtest [red-knot] Detect division-by-zero in unions and intersections (#17157) 2025-04-02 18:21:27 +02:00
README.md [red-knot] document test framework (#13695) 2024-10-10 12:02:01 -07:00

Markdown files within the mdtest/ subdirectory are tests of type inference and type checking; executed by the tests/mdtest.rs integration test.

See crates/red_knot_test/README.md for documentation of this test format.