[Mono-bugs] [Bug 608396] New: dlr throws exception when trying to evaluate method

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon May 24 14:23:51 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=608396

http://bugzilla.novell.com/show_bug.cgi?id=608396#c0


           Summary: dlr throws exception when trying to evaluate method
    Classification: Mono
           Product: Mono: Runtime
           Version: SVN
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: JIT
        AssignedTo: lupus at novell.com
        ReportedBy: svg at ngs.ru
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

code:
dynamic d=new object();
Console.WriteLine(d.ToString());

produces exception instead of "System.Object" output. 

code:

dynamic d=new object();
string s=d.ToString();
Console.WriteLine(s);

works as expected.

Reproducible: Always

Steps to Reproduce:
1.dmcs Main.cs -r:System.Core.dll -r:Microsoft.CSharp.dll 
2.mono Main.exe
3.
Actual Results:  
test1
System.Object
test2

Unhandled Exception: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException:
`string' does not contain a definition for `WriteLine'
at (wrapper dynamic-method) object.CallSite.Target
(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object)
<0x000a6>
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid1<object>
(System.Runtime.CompilerServices.CallSite,object) <0x00365>
at dmcsTest.MainClass.test2 () <0x00178>
at dmcsTest.MainClass.Main (string[]) <0x0000f>


Expected Results:  
test1
System.Object
test2
System.Object

mono v2.7 from SVN

svn info
URL: svn://anonsvn.mono-project.com/source/trunk/mono
Repository Root: svn://anonsvn.mono-project.com/source
Repository UUID: e3ebcda4-bce8-0310-ba0a-eca2169e7518
Revision: 157507

-- 
Configure bugmail: http://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