Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions mypy/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
Parameters,
ParamSpecType,
PartialType,
PlaceholderType,
ProperType,
TupleType,
Type,
Expand Down Expand Up @@ -246,14 +245,6 @@ def join_types(s: Type, t: Type, instance_joiner: InstanceJoiner | None = None)
if isinstance(s, UninhabitedType) and not isinstance(t, UninhabitedType):
s, t = t, s

# We shouldn't run into PlaceholderTypes here, but in practice we can encounter them
# here in the presence of undefined names
if isinstance(t, PlaceholderType) and not isinstance(s, PlaceholderType):
# mypyc does not allow switching the values like above.
return s.accept(TypeJoinVisitor(t))
elif isinstance(t, PlaceholderType):
return AnyType(TypeOfAny.from_error)

# Meets/joins require callable type normalization.
s, t = normalize_callables(s, t)

Expand Down