Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decompiler Bug or F# Quotation Bug: exception with certain list NewUnionCases #28

Closed
GoogleCodeExporter opened this issue Jun 21, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

This appears to be due to the "local optimization" of list union cases which 
aren't literal constructions:

> let x = [1;1;1];;

val x : int list = [1; 1; 1]

> <@ 1::x @> |> source;;
System.Exception: local list cons case not expected: Value (1)
   at FSI_0157.Swensen.Unquote.Sprint.sprint@400-397.Invoke(String message) in C:\Users\Stephen\Documents\Visual Studio 2010\Projects\Unquote\Unquote\Sprint.fs:line 400
   at Microsoft.FSharp.Core.PrintfImpl.go@512-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@510[b,c,d](FSharpFunc`2 initialize, String fmt, Int32 len, FSharpList`1 args)
   at Microsoft.FSharp.Core.PrintfImpl.capture@529[b,c,d](FSharpFunc`2 initialize, String fmt, Int32 len, FSharpList`1 args, Type ty, Int32 i)
   at <StartupCode$FSharp-Core>.$Reflect.Invoke@617-4.Invoke(T1 inp)
   at FSI_0157.Swensen.Unquote.Sprint.sprint@392-394(Int32 context, FSharpExpr expr) in C:\Users\Stephen\Documents\Visual Studio 2010\Projects\Unquote\Unquote\Sprint.fs:line 398
   at <StartupCode$FSI_0171>.$FSI_0171.main@()
Stopped due to error

Original issue reported on code.google.com by stephen....@gmail.com on 27 Mar 2011 at 1:58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant