Skip to content

(🎁) Intersections with @final types should trigger unreachable errors #15148

Closed
@KotlinIsland

Description

@KotlinIsland
from typing import final

@final
class A: ...
class B: ...

a: A
assert isinstance(a, B)
reveal_type(a)  # note: Revealed type is "__main__.<subclass of "A" and "B">"
print("hi") # no unreachable error

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions