Skip to content
This repository has been archived by the owner on Oct 31, 2021. It is now read-only.

Source code formatting breaks code by removing whitespace from expression #1050

Closed
bentayloruk opened this issue Jul 22, 2015 · 4 comments
Closed

Comments

@bentayloruk
Copy link

Source code formatting breaks the expression (Blah.TryCreate inputBlah), by removing the whitespace. The following complete example code shows the working version:

module File1

type Blah = 
  private
  | Blah of string

  static member TryCreate msg = 
    if msg = "" then None
    else Some(Blah msg)

  member __.Value = 
    match __ with
    | Blah msg -> msg

let inputBlah = "So, I was like, Visual Studio did wat!?"
let someBlahing = (Blah.TryCreate inputBlah).Value

After formatting, the last line has been changed and the code is broken:

module File1

type Blah = 
  private
  | Blah of string

  static member TryCreate msg = 
    if msg = "" then None
    else Some(Blah msg)

  member __.Value = 
    match __ with
    | Blah msg -> msg

let inputBlah = "So, I was like, Visual Studio did wat!?"
let someBlahing = (Blah.TryCreateinputBlah).Value
@dungpa
Copy link
Contributor

dungpa commented Jul 22, 2015

Thanks for reporting. I'll have a look.

@bentayloruk
Copy link
Author

Great. What does the upstream label denote? An issue in FCS/another dependency?

@dungpa
Copy link
Contributor

dungpa commented Jul 23, 2015

It's an issue in https://github.com/dungpa/fantomas engine. The 'upstream' label reminds me to push a fix there.

@bentayloruk
Copy link
Author

Thank you @dungpa! Your amazing work is very much appreciated by me! 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants