File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
tests/FSharp.Editor.Tests/Hints Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -69,9 +69,12 @@ module InlineParameterNameHints =
6969 symbol.DeclaringEntity
7070 |> Option.exists ( fun entity -> entity.CompiledName <> " Operators" )
7171
72+ let isNotCustomOperation =
73+ not <| symbol.HasAttribute< CustomOperationAttribute>()
74+
7275 ( symbol.IsFunction && isNotBuiltInOperator) // arguably, hints for those would be rather useless
7376 || symbol.IsConstructor
74- || symbol.IsMethod
77+ || ( symbol.IsMethod && isNotCustomOperation )
7578 else
7679 false
7780
Original file line number Diff line number Diff line change @@ -478,4 +478,17 @@ let test sequences =
478478
479479 let actual = getParameterNameHints document
480480
481- Assert.AreEqual( expected, actual)
481+ Assert.AreEqual( expected, actual)
482+
483+ [<Test>]
484+ let ``Hints are not shown when CustomOperation attribute is detected`` () =
485+ let code =
486+ """
487+ let q = query { for x in { 1 .. 10 } do select x }
488+ """
489+
490+ let document = getFsDocument code
491+
492+ let actual = getParameterNameHints document
493+
494+ Assert.IsEmpty actual
You can’t perform that action at this time.
0 commit comments