Skip to content

Internal FCS error is shown on SRTP pattern for struct tuple #6062

@Liminiens

Description

@Liminiens

Repro steps

  1. Write this code
let inline test (arg: ^T when ^T : struct) = 
    (^T : (member Item1: _) (arg))

[<EntryPoint>]
let main argv =
    let a = test struct (1, 2)
    0 // return an integer exit code

Expected behavior

Pattern works as ValueTuple has Item1 (?)

Actual behavior

FS0192	internal error: tcrefOfAppTy
FS0073	internal error: tcrefOfAppTy (Failure)
FS0073	internal error: tcrefOfAppTy (Failure)
FS0073	internal error: tcrefOfAppTy (Failure)
FS0073	internal error: tcrefOfAppTy (Failure)
FS0073	internal error: tcrefOfAppTy (Failure)

Related information

.NET Core SDK 2.2.101

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions