@@ -2637,20 +2637,25 @@ module AttributeChecking =
26372637let ( AttribInfo ( tref , _ )) = g.attrib_ SystemObsolete
26382638 isSome( TryDecodeILAttribute g tref( Some( tref.Scope)) cattrs)
26392639
2640+ /// Checks the attributes for CompilerMessageAttribute, which has an IsHidden argument that allows
2641+ /// items to be suppressed from intellisense.
2642+ let CheckFSharpAttributesForHidden g attribs =
2643+ nonNil attribs&&
2644+ ( match TryFindFSharpAttribute g g.attrib_ CompilerMessageAttribute attribswith
2645+ | Some( Attrib(_,_,[ AttribStringArg_; AttribInt32Arg messageNumber],
2646+ ExtractAttribNamedArg" IsHidden" ( AttribBoolArg v),_,_,_)) ->
2647+ // Message number 62 is for "ML Compatibility". Items labelled with this are visible in intellisense
2648+ // when mlCompatibility is set.
2649+ v&& not ( messageNumber= 62 && g.mlCompatibility)
2650+ | _ -> false )
2651+
26402652/// Indicate if a list of F# attributes contains 'ObsoleteAttribute'. Used to suppress the item in intellisense.
26412653/// Also check the attributes for CompilerMessageAttribute, which has an IsHidden argument that allows
26422654/// items to be suppressed from intellisense.
26432655let CheckFSharpAttributesForUnseen g attribs _m =
26442656 nonNil attribs&&
26452657( let isObsolete = isSome( TryFindFSharpAttribute g g.attrib_ SystemObsolete attribs)
2646- let isHidden =
2647- ( match TryFindFSharpAttribute g g.attrib_ CompilerMessageAttribute attribswith
2648- | Some( Attrib(_,_,[ AttribStringArg_; AttribInt32Arg messageNumber],
2649- ExtractAttribNamedArg" IsHidden" ( AttribBoolArg v),_,_,_)) ->
2650- // Message number 62 is for "ML Compatibility". Items labelled with this are visible in intellisense
2651- // when mlCompatibility is set.
2652- v&& not ( messageNumber= 62 && g.mlCompatibility)
2653- | _ -> false )
2658+ let isHidden = CheckFSharpAttributesForHidden g attribs
26542659 isObsolete|| isHidden
26552660)
26562661