Compute closure captures

This commit is contained in:
hkalbasi 2023-04-06 16:14:38 +03:30
parent 51d5862caf
commit 59b6f2d9f2
42 changed files with 2537 additions and 433 deletions

View file

@ -1227,6 +1227,24 @@ fn main() {
)
}
#[test]
fn call_info_for_fn_def_over_reference() {
check(
r#"
struct S;
fn foo(s: S) -> i32 { 92 }
fn main() {
let bar = &&&&&foo;
bar($0);
}
"#,
expect![[r#"
fn foo(s: S) -> i32
^^^^
"#]],
)
}
#[test]
fn call_info_for_fn_ptr() {
check(