basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

issue with intersection compatibility with nested union

Open KotlinIsland opened this issue 11 months ago • 0 comments

from __future__ import annotations

class A: ...
class B: ...
class C: ...

a: A & (B | C)
b: A & (B | C) = a  # Incompatible types in assignment (expression has type "A & B | C", variable has type "A & B | C")

KotlinIsland avatar Jan 06 '25 05:01 KotlinIsland