Skip to content

Commit 71cd67f

Browse files
committed
failing test
1 parent df0936b commit 71cd67f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

crates/ide_completion/src/completions/unqualified_path.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,4 +306,25 @@ pub mod prelude {
306306
"#]],
307307
);
308308
}
309+
310+
#[test]
311+
fn local_variable_shadowing() {
312+
// FIXME: this isn't actually correct, should emit `x` only once.
313+
check(
314+
r#"
315+
fn main() {
316+
let x = 92;
317+
{
318+
let x = 92;
319+
x$0;
320+
}
321+
}
322+
"#,
323+
expect![[r#"
324+
lc x i32
325+
lc x i32
326+
fn main() fn()
327+
"#]],
328+
);
329+
}
309330
}

0 commit comments

Comments
 (0)