[Mono-dev] bug or wrong mono compilation?

Geoff Norton gnorton at novell.com
Sun May 23 12:25:02 EDT 2010


It appears to be a bug in the dmcs compiler, could you file it in bugzilla please?

On 2010-05-23, at 12:17 PM, xplicit wrote:

> 
> 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
> 
> Why dmcs could be not working in this case? When I change source code to
> 
> dynamic a=new object();
> string s=a.ToString();
> Console.WriteLine(s);
> 
> It works as expected.
> 
> 
> 
> Alan McGovern wrote:
>> 
>> It works fine with r156922 from SVN. When building from trunk, always
>> give the svn revision that you built with.
>> 
>> Alan.
>> 
>> On Sat, May 22, 2010 at 5:36 PM, xplicit <svg at ngs.ru> wrote:
>>> 
>>> I have compiled mono 2.7 from trunk and try to use C# 4.0 features. I
>>> wrote
>>> simple program:
>>> 
>>> using System;
>>> 
>>> namespace test2
>>> {
>>>        class MainClass
>>>        {
>>>                public static void Main (string[] args)
>>>                {
>>>                        dynamic a=new object();
>>> 
>>>                        Console.WriteLine(a.ToString());
>>>                }
>>>        }
>>> }
>>> 
>>> and run it. I expect "System.Object" instead of it the exception occurs:
>>> 
>>> 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)
>>> <IL 0x0004e, 0x000a6>
>>> at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid1
>>> (System.Runtime.CompilerServices.CallSite,object) <0x00365>
>>> at test2.MainClass.Main (string[]) [0x0005d] in
>>> /home/sergey/Projects/test2/test2/Main.cs:11
>>> 
>>> What is this: bug in the mono, or I have wrongly compiled mono?
>>> 
>>> --
>>> View this message in context:
>>> http://mono.1490590.n4.nabble.com/bug-or-wrong-mono-compilation-tp2227282p2227282.html
>>> Sent from the Mono - Dev mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Mono-devel-list mailing list
>>> Mono-devel-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>> 
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>> 
>> 
> 
> -- 
> View this message in context: http://mono.1490590.n4.nabble.com/bug-or-wrong-mono-compilation-tp2227282p2227918.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list



More information about the Mono-devel-list mailing list