Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Fix wrong types for nested record fields #47

Closed
wants to merge 1 commit into from

Conversation

amiralies
Copy link
Contributor

This is a temporarily fix for rescript-lang/rescript-vscode#52

@amiralies
Copy link
Contributor Author

Before:
image

After:
image

@amiralies amiralies changed the title Fix wrong types for record fields Fix wrong types for nested record fields Jan 1, 2021
@cristianoc
Copy link
Contributor

Thanks a lot for this.
About expanding type group with its definition, I'm not sure. As another example is e.g. memberOf: (group, group) where one would definitely not expand group.

@amiralies
Copy link
Contributor Author

Yeah I think the same in fact typescript language server and merlin/ocamllsp have similar behaviour.

cristianoc added a commit that referenced this pull request Jan 4, 2021
Fixes rescript-lang/rescript-vscode#52

Continuation of #47

Show the correct type information, including type definition for record fields.
Also, fix issue in the docstring shown. Before it was either misssing (entire record type) or wrong (for record field, it was showing the doc comment of the containing record type).
Clean up code in References.
@cristianoc
Copy link
Contributor

Continued this in a more extensive PR: #48.

@cristianoc cristianoc closed this Jan 4, 2021
cristianoc added a commit that referenced this pull request Jan 4, 2021
Fixes rescript-lang/rescript-vscode#52

Continuation of #47

Show the correct type information, including type definition for record fields.
Also, fix issue in the docstring shown. Before it was either misssing (entire record type) or wrong (for record field, it was showing the doc comment of the containing record type).
Clean up code in References.
chenglou pushed a commit to chenglou/rescript-editor-support that referenced this pull request Apr 24, 2021
Fixes rescript-lang/rescript-vscode#52

Continuation of rescript-lang#47

Show the correct type information, including type definition for record fields.
Also, fix issue in the docstring shown. Before it was either misssing (entire record type) or wrong (for record field, it was showing the doc comment of the containing record type).
Clean up code in References.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants