Commit 99fd220
Do not insert Bindings for broken definitions (#2435)
Summary:
Closes #2116
This avoid returning this "expression" here:
https://github.com/facebook/pyrefly/blob/02dcdc40150998bdbd915fcb2f8051c50a1161f6/pyrefly/lib/binding/bindings.rs#L515
Which avoids adding a `Binding` for something that really doesn't exist.
Not sure if this is the best preferred way to handle these panics and bogus code.
Pull Request resolved: #2435
Test Plan: Added a testcase. I did run `test.py` but it did not generate any changes. Therefore, I just added the error codes myselff. That seems to have worked.
Reviewed By: fangyi-zhou
Differential Revision: D93386874
Pulled By: rchen152
fbshipit-source-id: 18b71504a450b8c7320724de7f374f299b4b66ae1 parent b00bc92 commit 99fd220
2 files changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2518 | 2518 | | |
2519 | 2519 | | |
2520 | 2520 | | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
2521 | 2527 | | |
2522 | 2528 | | |
2523 | 2529 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1069 | 1069 | | |
1070 | 1070 | | |
1071 | 1071 | | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
1072 | 1079 | | |
1073 | 1080 | | |
1074 | 1081 | | |
| |||
0 commit comments