Closed sergey-tihon closed 2 years ago
Hello Sergey, thank you for reporting this issue.
I believe we don't support the https://fsharp.github.io/fsharp-compiler-docs/reference/fsharp-compiler-syntax-synexpr.html#Fixed expression.
We can probably add this to https://github.com/fsprojects/fantomas/blob/ab3b477bfca5c5d67960b841aa2dda46313eb790/src/Fantomas/SourceParser.fs#L572-L587 similar to the other expressions.
Are you interested in submitting a PR for this?
Here is bigger real-world code sample with fixed
keyword
type BufferObject<'TDataType when 'TDataType : unmanaged>
(gl:GL, data:'TDataType[], bufferType:BufferTargetARB) as self =
let handle = gl.GenBuffer()
do self.Bind()
use ptr = fixed data
let size = unativeint <| (data.Length * sizeof<'TDataType>)
gl.BufferData(bufferType, size , NativePtr.toVoidPtr ptr, BufferUsageARB.StaticDraw)
member _.Bind() = gl.BindBuffer(bufferType, handle)
interface IDisposable with
member this.Dispose() = gl.DeleteBuffer(handle)
@nojaf should I close this issue now or you do it during release ?
Ah, usually, these get closed automatically when they are merged to the master branch. Your PR text didn't use a linked keyword, see https://github.com/fsprojects/fantomas/blob/master/CONTRIBUTING.md#pull-request-title and https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
Oh yeah and let me know if you want a release for this one.
No rush with it, so it can go with your usual release cycle
Issue created from fantomas-online
Code
Error
Problem description
Please describe here the Fantomas problem you encountered. Check out our Contribution Guidelines.
Extra information
Options
Fantomas master branch at 1/1/1990
Default Fantomas configuration
Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?