This type alias:
type T =
{| Id: Guid
|} []
leads to error: Unexpected symbol '[' in member definition
Replacing [] with another generic type (seq, list, option) leads to similar error: Unexpected identifier in member definition
Expected behavior
Code should be accepted by compiler.
Actual behavior
Compiler error when {| and |} are vertically aligned and there is generic type after |}
Known workarounds
- Indent closing bracket one space further.
- Use
T<A> generic type syntax.
Related information
dotnet --version
8.0.204
This type alias:
leads to error:
Unexpected symbol '[' in member definitionReplacing
[]with another generic type (seq,list,option) leads to similar error:Unexpected identifier in member definitionExpected behavior
Code should be accepted by compiler.
Actual behavior
Compiler error when
{|and|}are vertically aligned and there is generic type after|}Known workarounds
T<A>generic type syntax.Related information
dotnet --version8.0.204