Skip to content

Decompiler Bug or F# Quotation Bug: generic empty list treated as call #9

@GoogleCodeExporter

Description

@GoogleCodeExporter
Possibly a Quotation bug, resolution uncertain:

> let xl = [];;

val xl : 'a list

> <@ xl @>;;

  <@ xl @>;;
  ^^^^^^^^

C:\Users\Stephen\AppData\Local\Temp\stdin(9,1): error FS0030: Value 
restriction. The value 'it' has been inferred to have generic type
    val it : Expr<'_a list>    
Either define 'it' as a simple data term, make it a function with explicit 
arguments or, if you do not intend for it to be generic, add a type annotation.
> <@@ xl @@>;;
val it : Expr =
  Call (None,
      Microsoft.FSharp.Collections.FSharpList`1[System.Object] xl[Object](), [])
    {CustomAttributes = [NewTuple (Value ("DebugRange"),
          NewTuple (Value ("stdin"), Value (10), Value (4), Value (10),
                    Value (6)))];
     Type = Microsoft.FSharp.Collections.FSharpList`1[System.Object];}
> source <@ xl @>
;;
val it : string = "xl()"

Original issue reported on code.google.com by stephen....@gmail.com on 20 Feb 2011 at 2:55

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions