Skip to content

Fine-grained: Failure to propagate change when import changes to another class #4600

Closed
@JukkaL

Description

@JukkaL

This fine-grained incremental mode test case fails (no errors generated):

[case testIndirectAnnotationChange]
import a
from c import A
a.f(A())
[file a.py]
from b import A
def f(x: A) -> None: pass
[file b.py]
from c import A
[file b.py.2]
from d import A
[file c.py]
class A: pass
[file d.py]
class A: pass
[out]
==
main:3: error: Argument 1 to "f" has incompatible type "c.A"; expected "d.A"

My hypothesis is that this is caused by there being no dependency from a.A to a.f. #4598 might also needed to fix this (but it's not sufficient).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions