Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
7sharp9 opened this issue Aug 19, 2014 · 0 comments · Fixed by #207

Comments

@7sharp9
Copy link
Member

7sharp9 commented Aug 19, 2014

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...

@7sharp9 7sharp9 changed the title Add IsLiteral / LiteralValue to FSharpField so that Enum tooltips in XS can have the literal vlues rendered. Add IsLiteral / LiteralValue to FSharpField so that Enum tooltips in XS can have the literal values rendered. Aug 19, 2014
dsyme pushed a commit to dsyme/FSharp.Compiler.Service that referenced this issue Mar 23, 2015
fixes fsharp#119
closes fsharp#197

commit d4dd8389db1e97fe842529257da90a5218b7f195
Author: Vladimir Matveev <vladima@microsoft.com>
Date:   Tue Feb 3 16:20:52 2015 -0800

    added test for settable extension property

commit 5edc7ccacd90b8bbaba28ecdb7f9e5ecb1f3b171
Author: Vladimir Matveev <vladima@microsoft.com>
Date:   Tue Feb 3 16:20:26 2015 -0800

    addressed CR feedback

commit f17c57d250691a37811bdb82b7294b65ddc93676
Author: v2m <desco.by@gmail.com>
Date:   Sun Feb 1 14:55:02 2015 -0800

    added tests for property completion in object creation expressions

commit 38a073426d67da4eb33a8baa070ca8ba9420ea60
Author: v2m <desco.by@gmail.com>
Date:   Wed Jan 28 11:25:09 2015 -0800

    initial revision of completions for properties in 'new' expressions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant