update toString() of API::Node, and update expected output that depends on the former

This commit is contained in:
Erik Krogh Kristensen
2022-03-28 15:23:45 +02:00
parent c5fb19c377
commit e79eecb640
2 changed files with 4 additions and 4 deletions

View File

@@ -317,8 +317,8 @@ module API {
exists(Node pred, Label::ApiLabel lbl, string predpath |
Impl::edge(pred, lbl, this) and
predpath = pred.getAPath(length - 1) and
exists(string space | if length = 1 then space = "" else space = " " |
result = "(" + lbl + space + predpath + ")" and
exists(string dot | if length = 1 then dot = "" else dot = "." |
result = predpath + dot + lbl and
// avoid producing strings longer than 1MB
result.length() < 1000 * 1000
)

View File

@@ -1,6 +1,6 @@
underlyingTypeNode
| foo | Bar | foo.ts:3:1:5:1 | use (instance (member Bar (member exports (module foo)))) |
| foo | Bar | foo.ts:3:12:3:12 | use (instance (member Bar (member exports (module foo)))) |
| foo | Bar | foo.ts:3:1:5:1 | use moduleImport("foo").getMember("exports").getMember("Bar").getInstance() |
| foo | Bar | foo.ts:3:12:3:12 | use moduleImport("foo").getMember("exports").getMember("Bar").getInstance() |
#select
| foo.ts:3:12:3:12 | x | foo.Bar in unknown scope |
| foo.ts:4:10:4:10 | x | foo.Bar in unknown scope |