refactor document scope creation with ast.iterateChildren

This commit is contained in:
Techatrix
2023-05-29 22:54:34 +02:00
parent b958b258a3
commit 6f7f9dab9d
2 changed files with 53 additions and 265 deletions

View File

@@ -463,6 +463,16 @@ test "completion - usingnamespace" {
// TODO private should not be visible
.{ .label = "private", .kind = .Function, .detail = "fn private() !void" },
});
try testCompletion(
\\const S1 = struct {
\\ usingnamespace struct {
\\ pub fn inner() void {}
\\ };
\\};
\\const foo = S1.<cursor>
, &.{
.{ .label = "inner", .kind = .Function, .detail = "fn inner() void" },
});
}
test "completion - block" {