This is valid
open System
module Z =
type Alpha< ^b, ^a
when ^ a : (member Name:string)
and ^a: (member Zip
: ^b when
^b : struct )
and ^a
: (static member(+)
: 'a * 'a
-> 'a
)
> () =
member inline __.X = ()
with
static member inline Y = ()
This gives an indentation warning on the ( before static
type TypeWithALongName< ^a
when ^a:(static member(+):'a * 'a -> 'a )
and ^a:(static member(-):'a * 'a -> 'a )
and ^a:(static member(*):'a * 'a -> 'a )
and ^a:(static member(/):'a * 'a -> 'a )
> =
static member inline X = ()
It seems like there should be no warning on the latter and the former should be cause for multiple compiler errors
The F# 4.0 Spec states
The F# language uses simplified, indentation-aware syntactic constructs known as lightweight
syntax. The lines of the sample program in the previous section form a sequence of declarations and
are aligned on the same column.
So generics don't count?
This is valid
This gives an indentation warning on the
(beforestaticIt seems like there should be no warning on the latter and the former should be cause for multiple compiler errors
The F# 4.0 Spec states
So generics don't count?