http://bugzilla.novell.com/show_bug.cgi?id=507093
Summary: mdb does not use polymorphism in invocation expression
Classification: Mono
Product: Mono: Debugger
Version: 2.4.x
Platform: x86-64
OS/Version: UNIX Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: cli
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
Found By: ---
Created an attachment (id=294445)
--> (http://bugzilla.novell.com/attachment.cgi?id=294445)
Simple file used for testing
Description of Problem:
using "invocation expression" capability as described in
http://www.mono-project.com/Guide:Debugger is not possible to pass a derived
class to methods. here the steps to reproduce the problem:
noh...@murdoc:tmp$ mdb test_mdb.exe
Mono Debugger
(mdb) r
Starting program: test_mdb.exe
Thread @1 stopped at #0: 0x40890384 in Program.Main()+0x4 at /home/nohero
/tmp/test_mdb.cs:6.
6 print("hello, world");
(mdb) p Program.print("ciao, mondo")
ERROR: The best overload of method `Program.print' has some invalid
arguments:
Argument 0: Cannot implicitly convert `string' to `object'
using manual casting pretty works for value type:
(mdb) p Program.print((object) "ciao, mondo")
ciao, mondo
ERROR: Method `Program.print ()' doesn't return a value.
(mdb)
the same is not true for reference type:
(mdb) p Program.printProperties((object) obj)
ERROR: Cannot box object `...': not a value-type
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs