[Mono-dev] bug or wrong mono compilation?

Alan McGovern alan.mcgovern at gmail.com
Sun May 23 06:39:51 EDT 2010


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
>


More information about the Mono-devel-list mailing list