Commit 98d87b6
Add some more TypeVar-only test cases
Summary:
**This stack**
Adds a "callable residual" type that allows us to capture structure when a generic or overloaded callable is passed to a higher-order function. The residuals can later be "exploded" to recover generic and overload structure in outputs (either Callable outputs, or classes whose methods capture the callable structure of an argument - e.g. callback protocol classes).
The full design details are [here](https://github.com/stroxler/pyrefly-docs/tree/main/callable-residuals)
**This diff**
Agents, as they tend to do, implemented an initial solution to residual
handling that *shared absolutely no logic* with a correct answer but happened
to work on the test suite because all test cases involved an input that was
generic in a single type parameter that it returned.
This commit adds some more test cases where we have multiple type parameters
and/or the return type is concrete. This will make the test harness more robust
against completely incorrect implementations.
Reviewed By: rchen152
Differential Revision: D102011891
fbshipit-source-id: 8fcfab9052427d24a940c5c2a00dda9e485ef1be1 parent 35dab99 commit 98d87b6
1 file changed
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
65 | 93 | | |
66 | 94 | | |
67 | 95 | | |
| |||
0 commit comments