Skip to content

decompile not producing correct output in methods with optional params #124

@eiriktsarpalis

Description

@eiriktsarpalis

Consider the example:

type Foo =
    static member Foo(?x : int) = ()

decompile <@ Foo.Foo() @>              // "Foo.Foo(None)" 
decompile <@ Foo.Foo(x = 42) @>        // "Foo.Foo(Some(42))"
decompile <@ Foo.Foo(?x = Some 42) @>  // "Foo.Foo(Some(42))"

This does not produce valid F# in any of the cases.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions