Skip to content

Commit

Permalink
libnixf: fix missing visitor for ExprPath (#490)
Browse files Browse the repository at this point in the history
Fixes: #472
  • Loading branch information
inclyc committed May 2, 2024
1 parent a8fdfea commit cffe545
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libnixf/include/nixf/Basic/Nodes/Simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class ExprPath : public Expr {
return *Parts;
}

[[nodiscard]] ChildVector children() const override { return {}; }
[[nodiscard]] ChildVector children() const override { return {Parts.get()}; }
};

class ExprSPath : public Expr {
Expand Down
40 changes: 40 additions & 0 deletions nixd/tools/nixd/test/diagnostic-liveness-path.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# RUN: nixd --lit-test < %s | FileCheck %s

<-- initialize(0)

```json
{
"jsonrpc":"2.0",
"id":0,
"method":"initialize",
"params":{
"processId":123,
"rootPath":"",
"capabilities":{
},
"trace":"off"
}
}
```


<-- textDocument/didOpen

```json
{
"jsonrpc":"2.0",
"method":"textDocument/didOpen",
"params":{
"textDocument":{
"uri":"file:///basic.nix",
"languageId":"nix",
"version":1,
"text":"{x, y}: ./${x}/${y}"
}
}
}
```

```
CHECK: "diagnostics": []
```

0 comments on commit cffe545

Please sign in to comment.