Skip to content

Handle generics using interfaces #251

@Smaug123

Description

@Smaug123

type Thing = abstract Foo<'a, 'b> : 'a -> 'b can be represented with a pair of new types:

type FooCase =
    abstract Eval<'a, 'b> : 'a -> 'b

type ThingMock =
    {
        Foo : FooCase
    }
    static member Empty =
        {
            Foo = { new FooCase with member _.Eval a = failwith "not implemented" }
        }

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions