Skip to content

Table.ToRows() doesn't work for non-public F# records #2

@dvoits

Description

@dvoits

Description

When I declare an internal F# record and then use it as a generic type parameter for Table.ToRows(), it throws ArgumentNullException.

Repro steps

type internal InternalRecord = { x: float }
    
[<Test; Category("CI")>]
let ``Table.ToRows works for internal records``() =
    let t = Table.OfColumns [Column.Create("x", [1.0])]
    let rows = t.ToRows<InternalRecord>() |> Seq.toList
    Assert.AreEqual([ {x=1.0} ], rows)

Expected behavior

The given test must pass.

Actual behavior

Throws an exception when calling t.ToRows.

Known workarounds

Make the record public.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions