Skip to content
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

Unable to format Fable line (cannot determine if Expr Paren Fantomas.Core.SyntaxOak+ExprParenNode is uppercase or lowercase) #2998

Closed
cr3wdayt5p opened this issue Nov 23, 2023 · 2 comments · Fixed by #3092

Comments

@cr3wdayt5p
Copy link

Issue created from fantomas-online

Code

let statusBarHeight = (window?getComputedStyle document.documentElement)?getPropertyValue "--statusBarHeight"

Problem description

This valid line of Fable code throws:

System.Exception: cannot determine if Expr Paren Fantomas.Core.SyntaxOak+ExprParenNode is uppercase or lowercase

The issue is present in both 6.2.3 and 6.3.0-alpha-003.

Workaround

let statusBarHeight =
    let docStyle = (window?getComputedStyle document.documentElement)
    docStyle?getPropertyValue "--statusBarHeight"

This minor refactor is no problem for Fantomas.

@dawedawe
Copy link
Member

Hey @cr3wdayt5p ,
thanks for raising the issue.
If you want to work on this yourself, I think a good starting poing is here

@josh-degraw
Copy link
Contributor

Looks like the function that @dawedawe mentioned doesn't seem to explicitly know how to handle the )?. Do we not include dynamic expressions in chains?

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.

4 participants