-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[inferpython] fix infinite recursion bug in propagate_type model
Summary: the infinite loop was spotted when a module imports itself. In this unexpected situation type proprogation will not terminate. We now force termination by remember which field has been seen so far. Reviewed By: martintrojer Differential Revision: D69458601 Privacy Context Container: L1208441 fbshipit-source-id: 5043f7e38c7013f2a8fb2a05756869e681ff154b
- Loading branch information
1 parent
492a865
commit 445a65f
Showing
3 changed files
with
46 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
from cyclic_import import B | ||
|
||
class A: | ||
pass | ||
|
||
class B(A): | ||
pass | ||
|
||
|
||
class C(B): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters