Skip to content

Add test for component aliasing. #241

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 1 commit into from
May 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
13 changes: 13 additions & 0 deletions analysis/tests/src/Hover.res
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,16 @@ module B = A

module C = B
// ^hov

module Comp = {
@react.component
let make = (~children: React.element) => children
}

module Comp1 = Comp

let _ = <Comp> <div /> <div /> </Comp>
// ^hov

let _ = <Comp1> <div /> <div /> </Comp1>
// ^hov
6 changes: 6 additions & 0 deletions analysis/tests/src/expected/Hover.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ Hover tests/src/Hover.res 71:7
Hover tests/src/Hover.res 74:7
{"contents": "```rescript\nmodule A = {\n let x: int\n}\n```"}

Hover tests/src/Hover.res 84:10
{"contents": "```rescript\n{\"children\": React.element} => React.element\n```"}

Hover tests/src/Hover.res 87:10
{"contents": "```rescript\n{\"children\": React.element} => React.element\n```"}