diff options
-rw-r--r-- | crates/hir_def/src/nameres/tests/block.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/crates/hir_def/src/nameres/tests/block.rs b/crates/hir_def/src/nameres/tests/block.rs index 996704308..ab7ec9d62 100644 --- a/crates/hir_def/src/nameres/tests/block.rs +++ b/crates/hir_def/src/nameres/tests/block.rs | |||
@@ -45,3 +45,28 @@ fn outer() { | |||
45 | "#]], | 45 | "#]], |
46 | ); | 46 | ); |
47 | } | 47 | } |
48 | |||
49 | #[test] | ||
50 | fn merge_namespaces() { | ||
51 | check_at( | ||
52 | r#" | ||
53 | //- /lib.rs | ||
54 | struct name {} | ||
55 | fn outer() { | ||
56 | fn name() {} | ||
57 | |||
58 | use name as imported; // should import both `name`s | ||
59 | |||
60 | $0 | ||
61 | } | ||
62 | "#, | ||
63 | expect![[r#" | ||
64 | block scope | ||
65 | imported: t v | ||
66 | name: v | ||
67 | crate | ||
68 | name: t | ||
69 | outer: v | ||
70 | "#]], | ||
71 | ); | ||
72 | } | ||