You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This actually isn't a bug but a consequence of the new F# 6 syntax.
You are indexing TestApi with the sequential expression asset1; asset2.
When putting this example in F# interactive:
Microsoft (R) F# Interactive version 12.5.0.0 for F# 7.0
Copyright (c) Microsoft Corporation. All Rights Reserved.
For help type #help;;
> let TestApi _ = ();;
val TestApi: 'a -> unit
> TestApi[ 1; 2 ];;
TestApi[ 1; 2 ]
^^^^^^^^^^^^^^^
stdin(2,1): info FS3365: The syntax 'expr1[expr2]' is used for indexing. Consider adding a type annotation to enable indexing, or if calling a function add a space, e.g. 'expr1 [expr2]'.
val it: unit = ()
You get a warning/info message about this.
Most likely you are using a newer Fantomas for an older project. So, in rare cases, the newer syntax rules clash a bit with what your compiler will tell you.
I'm going to leave this issue open, as we should cover this in our documentation.
(You are not the first to bring this up, see #2158)
Issue created from fantomas-online
Code
Result
Problem description
It should format to
TestApi [ asset1; asset2 ]
and it does if a space is provided between the type name and listOptions
Fantomas v5.2 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?
The text was updated successfully, but these errors were encountered: