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

Decompiler Bug: local lambdas captured by quotations are sprinted with mangled names #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
e.g. the following test

[<Fact>]
let ``general local lambda sprinting`` () =
    let myFunc x y = if x = 0 && y = 0 then None else Some(x + y)
    test <@ decompile <@ myFunc 0 1 @> = "myFunc 0 1" @>

fails with

Test 'DecompilationTests.general local lambda sprinting' failed: 

decompile <@ <fun:myFunc@897> 0 1 @> = "myFunc 0 1"
"<fun:myFunc@897> 0 1" = "myFunc 0 1"
false

    C:\Users\Stephen\Documents\Visual Studio 2010\Projects\Unquote\code\UnquoteTests\DecompilationTests.fs(898,0): at DecompilationTests.general local lambda sprinting()

Original issue reported on code.google.com by stephen....@gmail.com on 11 Apr 2012 at 1:21

GoogleCodeExporter commented 9 years ago

Original comment by stephen....@gmail.com on 11 Apr 2012 at 1:24

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r469.

Original comment by stephen....@gmail.com on 11 Apr 2012 at 6:28

GoogleCodeExporter commented 9 years ago

Original comment by stephen....@gmail.com on 11 Apr 2012 at 8:46