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
287 stars 25 forks source link

Decompiler Bug: the names for some local lambdas captured by quotations are not being demangled properly #81

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently using the regex @"^<fun:(.+)@\d+>$" but this is too restrictive since 
it doesn't capture managed lambda names which have dashes in the number part. 
e.g. <fun:myFunc@966-1>.

Will either loosen regex like @"^<fun:(.+)@.+>$" or keep it tight but correct 
like @"^<fun:(.+)@\d+(-\d+)?>$"

Original issue reported on code.google.com by stephen....@gmail.com on 15 Apr 2012 at 3:39

GoogleCodeExporter commented 9 years ago
related to issue 79

Original comment by stephen....@gmail.com on 15 Apr 2012 at 3:46

GoogleCodeExporter commented 9 years ago
so far, the only way I have reproduced this issue is with function named "f"... 
kinda odd, i thought it would have to do with shadowing... i have also seen it 
with anonymous lambdas in in FSI, e.g. 

> fun f x -> x;;
val it : 'a -> 'b -> 'b = <fun:clo@3-2>

but i don't think that comes into play in quotations, because those are fully 
captured and sprinted as they are.

This tips my decision to use the "looser" implementation, since the naming 
convention here is not very well understood for me, and is an awfully low-level 
detail, and the "loose" pattern is tight enough.

Original comment by stephen....@gmail.com on 15 Apr 2012 at 4:11

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

Original comment by stephen....@gmail.com on 15 Apr 2012 at 4:13

GoogleCodeExporter commented 9 years ago

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