Skip to content

Commit

Permalink
Delete a ProperType join hack (#15461)
Browse files Browse the repository at this point in the history
The tests added with this piece of code now pass even without it. It
looks like the crash was properly fixed by
#13371
  • Loading branch information
ilevkivskyi committed Jun 19, 2023
1 parent 0873230 commit 32d14ed
Showing 1 changed file with 0 additions and 9 deletions.
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

0 comments on commit 32d14ed

Please sign in to comment.