KotlinIsland / KotlinIsland/basedmypy

Intersections with `@final` types should result in `Never`

Open
#451 3 comments 0 reactions 0 assignees View on GitHub
topic-intersection
Dominant language
Python
Stars
202
Forks
6
PR merge metrics
No merged PRs in 30d

Description

```py
@final
class A: pass
class B: pass

x: A & B
reveal_type(x) # Never
```

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by locating intersection-type handling and related tests for @final or reveal_type, then reproduce the example and trace the inferred type. Done means the intersection of incompatible @final and non-final classes is reported as Never with a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.