zzarchive-VisualFSharpPowerTools
zzarchive-VisualFSharpPowerTools copied to clipboard
[Gray out unused declarations] Doesn't gray out self-referenced `rec` functions
Given the following declarations, the Gray out unused declarations
option correctly grays out f'
and adds a marker to the scroll bar. The definition for f
is not grayed out, because it references itself. While a self-reference technically means that the function is used at some point, it rather defeats the purpose of looking for unused definitions.
let rec private f x =
match x with
| None -> None
| Some(_) -> f x
let rec private f' x =
match x with
| None -> 0
| Some(y) -> y