Skip to content

Hover record type substitution #560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add debug info.
  • Loading branch information
cristianoc committed Aug 31, 2022
commit c2913c657db8e02a5c73ee2cabd8e03392930dbb
2 changes: 2 additions & 0 deletions analysis/tests/src/Hover.res
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ module TypeSustitutionRecords = {
type bar = {age: int}
type foobar = foo<bar>

// ^db+

let x1: foo<bar> = {content: {age: 42}, zzz: ""}
// ^hov
let x2: foobar = {content: {age: 42}, zzz: ""}
Expand Down
20 changes: 18 additions & 2 deletions analysis/tests/src/expected/Hover.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,25 @@ Hover src/Hover.res 142:9
Hover src/Hover.res 146:6
{"contents": "```rescript\nint\n```\n\n doc comment 2 "}

Hover src/Hover.res 163:23

Hover src/Hover.res 165:23
Ident!! Dep
Ident!! JsLogger
Ident!! A
Ident!! B
Ident!! Comp
locItems:
165:22-165:29 Typed content foo<'a> (LocalReference Field(content))
[ref] Local defn Field(content)
{"contents": "```rescript\nfoo<'a>\n```\n\n```rescript\ntype foo<'a> = {content: 'a, zzz: string}\n```"}

Hover src/Hover.res 165:22
Hover src/Hover.res 167:22
Ident!! Dep
Ident!! JsLogger
Ident!! A
Ident!! B
Ident!! Comp
locItems:
167:20-167:27 Typed content foo<'a> NotFound
{"contents": "```rescript\nfoo<'a>\n```\n\n```rescript\ntype foo<'a> = {content: 'a, zzz: string}\n```"}