Skip to content

Regression: missing output from reveal_type #15954

Closed as not planned
Closed as not planned
@eltoder

Description

@eltoder

Apologies if this was already reported. reveal_type is a hard thing to search for.

To Reproduce

https://mypy-play.net/?mypy=latest&python=3.11&gist=2a1d6a831177eb02b175a25fc07a374e

class A:
    x: int

class B:
    x: float

class C(A, B):
    x: int

c: A = C()
assert isinstance(c, B)
reveal_type(c)
reveal_type(c.x)

Expected Behavior

I expect to see 2 lines of output from reveal_type. This works in 1.4.x but stopped working in 1.5.x.

Actual Behavior

No output.

Your Environment

  • Mypy version used: 1.5.1
  • Python version used: 3.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrongtopic-reachabilityDetecting unreachable code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions