Skip to content
Closed
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
5 changes: 4 additions & 1 deletion analysis/tests/src/Hover.res
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module HoverInsideModuleWithComponent = {
let make = () => React.null
}

@ocaml.doc("Doc comment for functionWithTypeAnnotation")
@ocaml.doc("Doc comment **for** functionWithTypeAnnotation")
let functionWithTypeAnnotation : unit => int = () => 1
// ^hov

Expand All @@ -44,3 +44,6 @@ let make2 = (~name:string) => React.string(name)

let num = 34
// ^hov

let withAnnot = OcamlFile.functionWithTypeAnnotation
// ^hov
3 changes: 3 additions & 0 deletions analysis/tests/src/OcamlFile.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
let functionWithTypeAnnotation () = 1
[@@ocaml.doc "Doc comment **for** functionWithTypeAnnotation"]

5 changes: 4 additions & 1 deletion analysis/tests/src/expected/Hover.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Hover tests/src/Hover.res 26:6
{"contents": "```rescript\nint\n```"}

Hover tests/src/Hover.res 33:4
{"contents": "```rescript\nunit => int\n```\n\nDoc comment for functionWithTypeAnnotation"}
{"contents": "```rescript\nunit => int\n```\n\nDoc comment **for** functionWithTypeAnnotation"}

Hover tests/src/Hover.res 37:13
{"contents": "```rescript\nstring\n```"}
Expand All @@ -28,3 +28,6 @@ Hover tests/src/Hover.res 41:13
Hover tests/src/Hover.res 44:10
{"contents": "```rescript\nint\n```"}

Hover tests/src/Hover.res 47:29
{"contents": "```rescript\nunit => int\n```\n\nDoc comment **for** functionWithTypeAnnotation"}