Skip to content

Signature generation roundtrip issue: SRTP type params with angle brackets in name #19595

@T-Gro

Description

@T-Gro

Implementation (simplified from tests/fsharp/typecheck/sigs/pos34.fs):

SRTP inline member with backtick-encoded type params like Monad<'T>.

Actual generated signature (partial):

static member
  inline
  Invoke<^Monad<'T>,^Monad<'U>,'T
           when (Bind or ^Monad<'T> or ^Monad<'U>) :
                  (static member (>>=) :
                     ^Monad<'T> * ('T -> ^Monad<'U>) -> ^Monad<'U>)> : ...

The type params ^Monad<'T> contain angle brackets, which the parser reads as type application.

Error on roundtrip compile:

error FS0010: Unexpected type application in member signature. Expected '>' or other token.

Expected: Type param names containing < and > must be backtick-escaped, e.g. `^``Monad<'T>```.

Full repro: compile tests/fsharp/typecheck/sigs/pos34.fs with --sig, then roundtrip.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

New

Relationships

None yet

Development

No branches or pull requests

Issue actions