SwensenSoftware / unquote

Write F# unit test assertions as quoted expressions, get step-by-step failure messages for free
http://www.swensensoftware.com/unquote
Apache License 2.0
285 stars 26 forks source link

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

Open eiriktsarpalis opened 8 years ago

eiriktsarpalis commented 8 years ago

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.