[Mono-bugs] [Bug 633724] New: --debug=casts does not work for delegates

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Aug 23 11:17:08 EDT 2010


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

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


           Summary: --debug=casts does not work for delegates
    Classification: Mono
           Product: Mono: Runtime
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: msafar at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


using System;

public class C
{
    delegate void D<in T> (T t);

    public static int Main ()
    {
        D<string> d_a = delegate (string s) {};
        D<object> d_b = (D<object>) d_a;
        return 0;
    }
}

mono --debug=casts bug-casts.exe 

Unhandled Exception: System.InvalidCastException: Cannot cast from source type
to destination type.
  at (wrapper managed-to-native) object:__icall_wrapper_mono_object_castclass
(object,intptr)
  at C.Main () [0x00000] in <filename unknown>:0

-- 
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