Skip to content

Commit 32d14ed

Browse files
authored
Delete a ProperType join hack (#15461)
The tests added with this piece of code now pass even without it. It looks like the crash was properly fixed by #13371
1 parent 0873230 commit 32d14ed

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

mypy/join.py

-9
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
Parameters,
3030
ParamSpecType,
3131
PartialType,
32-
PlaceholderType,
3332
ProperType,
3433
TupleType,
3534
Type,
@@ -246,14 +245,6 @@ def join_types(s: Type, t: Type, instance_joiner: InstanceJoiner | None = None)
246245
if isinstance(s, UninhabitedType) and not isinstance(t, UninhabitedType):
247246
s, t = t, s
248247

249-
# We shouldn't run into PlaceholderTypes here, but in practice we can encounter them
250-
# here in the presence of undefined names
251-
if isinstance(t, PlaceholderType) and not isinstance(s, PlaceholderType):
252-
# mypyc does not allow switching the values like above.
253-
return s.accept(TypeJoinVisitor(t))
254-
elif isinstance(t, PlaceholderType):
255-
return AnyType(TypeOfAny.from_error)
256-
257248
# Meets/joins require callable type normalization.
258249
s, t = normalize_callables(s, t)
259250

0 commit comments

Comments
 (0)