[Mono-bugs] [Bug 411630] New: MDB can't execute methods from generic classes

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jul 23 12:58:22 EDT 2008


           Summary: MDB can't execute methods from generic classes
           Product: Mono: Debugger
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: cli
        AssignedTo: martin at novell.com
        ReportedBy: lluis at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Test case:

using System;

namespace Test
        class SomeGeneric<T>
                public int Run ()
                        Console.WriteLine ("Done");
                        return 1;

        class MainClass
                public static void Main(string[] args)
                        SomeGeneric<int> s = new SomeGeneric<int> ();
                        Console.WriteLine ("Instance Ready");

Set a breakpoint in the "Instance Ready" WriteLine, and run the app. Then try
to execute the method Run on that instance. It will print an error about method
not found. Notice that it works fine if the class is not generic.

Here is the sequence:

lluis at portador:~/temp> mdb kk.exe
Mono Debugger
(mdb) b kk.cs:19
Breakpoint 2 at kk.cs:19
(mdb) r
Starting program: kk.exe 
Thread @1 stopped at #0: 0xb7842237 in Test.MainClass.Main(string[])+0x7 at
  18                    SomeGeneric<int> s = new SomeGeneric<int> ();
(mdb) c
Thread @1 hit breakpoint 2 at #0: 0xb7842255 in
Test.MainClass.Main(string[])+0x25 at /home/lluis/temp/kk.cs:19.
  19                    Console.WriteLine ("Instance Ready");
(mdb) p s
(Test.SomeGeneric`1<int>) { }
(mdb) p s.Run ()
ERROR: Type `Test.SomeGeneric`1<int>' has no member `Run'

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

More information about the mono-bugs mailing list