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

Partially applied symbolic function causes exception #85

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
> let (+) x y z = x - y - z;;

val ( + ) : int -> int -> int -> int

> decompile <@ (+) 3 3 @>;;
System.Exception: partial applied binary op should only have 0 or 1 args but 
has more: [Value (3); Value (3)]
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@598.Invoke(String message)
   at Microsoft.FSharp.Core.PrintfImpl.go@523-3[b,c,d](String fmt, Int32 len, FSharpFunc`2 outputChar, FSharpFunc`2 outa, b os, FSharpFunc`2 finalize, FSharpList`1 args, Int32 i)
   at Microsoft.FSharp.Core.PrintfImpl.run@521[b,c,d](FSharpFunc`2 initialize, String fmt, Int32 len, FSharpList`1 args)
   at Microsoft.FSharp.Core.PrintfImpl.capture@540[b,c,d](FSharpFunc`2 initialize, String fmt, Int32 len, FSharpList`1 args, Type ty, Int32 i)
   at <StartupCode$FSharp-Core>.$Reflect.Invoke@720-4.Invoke(T1 inp)
   at Swensen.Unquote.Decompilation.decompile@42-1.Invoke(FSharpExpr expr) in C:\Users\Stephen\Documents\Visual Studio 11\Projects\Unquote\code\Unquote\Decompilation.fs:line 67
   at Swensen.Unquote.Decompilation.decompile(FSharpExpr expr) in C:\Users\Stephen\Documents\Visual Studio 11\Projects\Unquote\code\Unquote\Decompilation.fs:line 305
   at Swensen.Unquote.Extensions.Expr.Decompile(FSharpExpr ) in C:\Users\Stephen\Documents\Visual Studio 11\Projects\Unquote\code\Unquote\Extensions.fs:line 41
   at <StartupCode$FSI_0073>.$FSI_0073.main@()
Stopped due to error

Original issue reported on code.google.com by stephen....@gmail.com on 23 Apr 2012 at 2:28

GoogleCodeExporter commented 9 years ago
Note that this only manifests when the operator is redefined at the top level

Original comment by stephen....@gmail.com on 29 Apr 2012 at 7:04

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

Original comment by stephen....@gmail.com on 29 Apr 2012 at 7:43

GoogleCodeExporter commented 9 years ago

Original comment by stephen....@gmail.com on 20 May 2012 at 4:23