Skip to content

Commit 388210f

Browse files
stroxlermeta-codesync[bot]
authored andcommitted
Add module-level comment for callable_residuals.rs
Summary: Suggested by Neil in diff review, seems worth having. Reviewed By: rchen152 Differential Revision: D102718837 fbshipit-source-id: eb43465113c00b130637598126acdf5d337b3cdf
1 parent c0536be commit 388210f

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

pyrefly/lib/test/callable_residuals.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
/* Callable residuals represent type parameters of higher order functions
9+
* that "capture" complex structure in an argument that is a callable
10+
* type, when that callable is generic or overloaded.
11+
*
12+
* The resulting "residual" types can potentially live in the TArgs
13+
* of a class (which lets us model things like callback protocols, where
14+
* a class might capture the full callable structure of an input function).
15+
*
16+
* A residual always has a "fallback" behavior where it flattens to an approximate
17+
* type, but if it appears in a Callable type then we will try to "explode" the
18+
* generic and/or overload structure implied by residual types.
19+
*
20+
* This module is for tests that touch this residual-type and exploding-callable
21+
* behavior.
22+
*/
23+
824
use crate::testcase;
925

1026
// Make sure no residual type leaks into user output, when a residual

0 commit comments

Comments
 (0)