KotlinIsland / KotlinIsland/basedmypy

Think about how `Any` should interact with `Intersection`s

Open
#459 0 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
class A:
a: int
x: A & Any
reveal_type(x) # A? A & Any?
reveal_type(x.a) # int? int & Any?
reveal_type(x.b) # error? Any?
```

I think the `Any` should just be deleted and it becomes `A`.

Contributor guide

Open the contributing guide

Research direction

The issue provides only a Python example involving Any and intersections, with no files, tests, or entry points named. Start by determining the intended types for x, x.a, and x.b; done means reaching a clear decision on these semantics and covering the decision in the checker’s tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.