zzarchive-VisualFSharpPowerTools icon indicating copy to clipboard operation
zzarchive-VisualFSharpPowerTools copied to clipboard

[Gray out unused declarations] Doesn't gray out self-referenced `rec` functions

Open allykzam opened this issue 9 years ago • 0 comments

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

allykzam avatar Apr 01 '15 16:04 allykzam