[Mono-bugs] [Bug 653941] New: Exception with un-instantiated type variable in F# 2.0.0.0

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Nov 16 07:49:24 EST 2010


https://bugzilla.novell.com/show_bug.cgi?id=653941

https://bugzilla.novell.com/show_bug.cgi?id=653941#c0


           Summary: Exception with un-instantiated type variable in F#
                    2.0.0.0
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.8.x
          Platform: x86-64
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: generics
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: alex_muscar at yahoo.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Community User
           Blocker: No


Description of Problem:

An exception is thrown when trying to print a type with uninstantiated generic
type variables in F#'s interactive loop:

Exception raised during pretty printing.
Please report this so it can be fixed.
Trace: System.NotSupportedException: Operation is not supported.
  at System.Reflection.Emit.MethodOnTypeBuilderInst.Invoke (System.Object obj,
BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[]
parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename
unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[]
parameters) [0x00000] in <filename unknown>:0 
  at
Microsoft.FSharp.Compiler.Interactive.Shell+Utilities.callGenericStaticMethod
(System.Type ty, System.String name, Microsoft.FSharp.Collections.FSharpList`1
tyargs, Microsoft.FSharp.Collections.FSharpList`1 args) [0x00000] in <filename
unknown>:0 
  at Microsoft.FSharp.Compiler.Interactive.Shell+FsiValuePrinter.PrintValue
(Microsoft.FSharp.Compiler.Interactive.FsiValuePrinterMode printMode,
Internal.Utilities.StructuredFormat.FormatOptions opts, System.Object x,
System.Type ty) [0x00000] in <filename unknown>:0 

Steps to reproduce the problem:
> type Reader = interface end;;

type Reader =
  interface
  end

> type Writer = interface end;;

type Writer =
  interface
  end

> type Agent<'T> = { name : string };;

type Agent<'T> =
  {name: string;}

> let reader name : Agent<Reader> = { name = name };;

val reader : string -> Agent<Reader>

> let writer name : Agent<Writer> = { name = name };;

val writer : string -> Agent<Writer>

> reader "r";;

Exception raised during pretty printing.


Actual Results:
An exception is raised.

Expected Results:
The pretty print of the type.


How often does this happen? 


Additional Information:

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list