File tree Expand file tree Collapse file tree 4 files changed +33
-0
lines changed Expand file tree Collapse file tree 4 files changed +33
-0
lines changed File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ A test showing that we manage to get docstrings even when they are not kept as
2
+ attributes on the AST .
3
+
4
+ $ cat > test. ml << EOF
5
+ > let foo x y = (** incorrect doc for foo * )
6
+ > x + y
7
+ >
8
+ > let bar = foo
9
+ > EOF
10
+
11
+ $ $ MERLIN single document -position 4 : 13 -filename test. ml < test. ml
12
+ {
13
+ " class" : " return" ,
14
+ " value" : " incorrect doc for foo" ,
15
+ " notifications" : []
16
+ }
17
+
18
+ And that it also works outside of the current buffer:
19
+
20
+ $ $ OCAMLC -c -bin-annot -w +50 test. ml
21
+ File " test.ml" , line 1 , characters 14 -42:
22
+ 1 | let foo x y = (** incorrect doc for foo * )
23
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24
+ Warning 50 [unexpected-docstring]: unattached documentation comment (ignored)
25
+
26
+ $ $ MERLIN single document -position 1 : 18 -filename outside. ml << EOF
27
+ > let bar = Test . foo
28
+ > EOF
29
+ {
30
+ " class" : " return" ,
31
+ " value" : " incorrect doc for foo" ,
32
+ " notifications" : []
33
+ }
You can’t perform that action at this time.
0 commit comments