Thanks to visit codestin.com
Credit goes to github.com

Skip to content

GetAllUsesOfAllSymbolsInFile returns wrong FSharpSymbolUse for extension properties #178

Closed
@vasily-kirichenko

Description

@vasily-kirichenko

For code

module Module =
    type System.String with
        member __.ExtensionProperty = ()
open Module
let _ = "a long string".ExtensionProperty

CheckFileResults.GetAllUsesOfAllSymbolsInFile returns the following FSharpSymbolUse for ExtensionProperty in the last line:

image

The wrong things are:

  • FullName is "System.String.ExtensionProperty" (instead of "SourceCodeClassifierTests.Module.ExtensionProperty" as it is for line 4, when it's defined)
  • RangeAlternate covers the property itself and "a long string" value altogether (instead of 6, 24; 6, 41 it's 6, 8; 6, 41).

All these blocks me to finish "Gray out unused open declaration" VFPT feature fsprojects-archive/zzarchive-VisualFSharpPowerTools#574 because I cannot determine that open Module is actually used by line let _ = "a long string".ExtensionProperty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions