From 575e96a70558d01174b231d2308bb4dec91e355b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulysse=20G=C3=A9rard?= Date: Thu, 2 May 2024 11:14:04 +0200 Subject: [PATCH] test: locate fails on infix operator with parenthesis --- tests/test-dirs/type-enclosing/need-parens.t | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/test-dirs/type-enclosing/need-parens.t diff --git a/tests/test-dirs/type-enclosing/need-parens.t b/tests/test-dirs/type-enclosing/need-parens.t new file mode 100644 index 0000000000..21954932e1 --- /dev/null +++ b/tests/test-dirs/type-enclosing/need-parens.t @@ -0,0 +1,21 @@ +FIXME: locate on `M.(|+)` should work: + $ $MERLIN single locate -position 2:11 -filename test.ml <<'EOF' | \ + > jq '.value' + > module M = struct let (+) a b = a + b end + > let _ = M.(+) + > EOF + "Not in environment 'M.+'" + +Locate on `M.(+|)` should work: + $ $MERLIN single locate -position 2:12 -filename test.ml <<'EOF' | \ + > jq '.value' + > module M = struct let (+) a b = a + b end + > let _ = M.(+) + > EOF + { + "file": "test.ml", + "pos": { + "line": 1, + "col": 22 + } + }