Skip to content

Add IsLiteral / LiteralValue to FSharpField so that Enum tooltips in XS can have the literal values rendered. #197

Closed
@7sharp9

Description

@7sharp9

Please add LiteralValues to FSharpField symbols. This will allow Enum tooltips to be rendered in XS, at them moment its not possible to extract a literal value from an FSharpField

They should be available via the following:

type FSharpField(g:TcGlobals, thisCcu, tcImports, d: FSharpFieldData)  =
    inherit FSharpSymbol (g, thisCcu, tcImports,  

...

    member __.IsLiteral = 
        if isUnresolved() then false else 
        d.RecdField.LiteralValue.IsSome

    member __.LiteralValue = 
        if isUnresolved() then None else 
        d.RecdField.LiteralValue

If this is ok then I can submit a PR...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions