Skip to content

Commit a1973a9

Browse files
Dian Shengmeta-codesync[bot]
authored andcommitted
Revert D92223176: Fix memory leak in test.test_bytes
Differential Revision: D92223176 Original commit changeset: 50e41b277f46 Original Phabricator Diff: D92223176 fbshipit-source-id: 40159fa1b0efe10ed4576ca9b7fa415cb441edcc
1 parent 4abc01b commit a1973a9

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

cinderx/Jit/hir/pass.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,6 @@ Type returnType(Type callable) {
7272
Type result =
7373
Type::fromTypeExact(reinterpret_cast<PyTypeObject*>(callable_obj));
7474
if (result <= TBuiltinExact && !(result <= TType)) {
75-
if (result <= TUnicodeExact || result <= TBytesExact) {
76-
// bytes and str are odd in that you can have a subclass which overrides
77-
// __str__ or __bytes__ and returns a subclass. The subclass is what's
78-
// returned instead of an exact type. Other types (e.g. int, float,
79-
// complex) do not have this behavior and returning a subclass from
80-
// their dunder method is deprecated. But if you do you'll get the exact
81-
// type.
82-
return result | TUser;
83-
}
8475
return result;
8576
}
8677
}

0 commit comments

Comments
 (0)