diff --git a/analysis/tests/src/Hover.res b/analysis/tests/src/Hover.res index 5a6501f36..6731fb20d 100644 --- a/analysis/tests/src/Hover.res +++ b/analysis/tests/src/Hover.res @@ -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 @@ -44,3 +44,6 @@ let make2 = (~name:string) => React.string(name) let num = 34 // ^hov + +let withAnnot = OcamlFile.functionWithTypeAnnotation +// ^hov \ No newline at end of file diff --git a/analysis/tests/src/OcamlFile.ml b/analysis/tests/src/OcamlFile.ml new file mode 100644 index 000000000..53e230629 --- /dev/null +++ b/analysis/tests/src/OcamlFile.ml @@ -0,0 +1,3 @@ +let functionWithTypeAnnotation () = 1 +[@@ocaml.doc "Doc comment **for** functionWithTypeAnnotation"] + diff --git a/analysis/tests/src/expected/Hover.res.txt b/analysis/tests/src/expected/Hover.res.txt index 7a0e4f5fe..93dbbad40 100644 --- a/analysis/tests/src/expected/Hover.res.txt +++ b/analysis/tests/src/expected/Hover.res.txt @@ -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```"} @@ -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"} +