X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2Fdynamic.cs;h=0246c43a1b67fa9cba25972b19e283fd7558a5b2;hb=a4a84a1325565b912b1fe4d19d40cfd0affa1a3a;hp=1a0288e960e40f672ecc71f00670a615b28b05b8;hpb=a83cae38b4ab785307c7700033d696990b7fa676;p=mono.git diff --git a/mcs/mcs/dynamic.cs b/mcs/mcs/dynamic.cs index 1a0288e960e..0246c43a1b6 100644 --- a/mcs/mcs/dynamic.cs +++ b/mcs/mcs/dynamic.cs @@ -447,6 +447,7 @@ namespace Mono.CSharp d.CreateContainer (); d.DefineContainer (); d.Define (); + d.PrepareEmit (); site.AddTypeContainer (d); del_type = new TypeExpression (d.CurrentType, loc); @@ -502,7 +503,7 @@ namespace Mono.CSharp using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) { if (s.Resolve (bc)) { - Statement init = new If (new Binary (Binary.Operator.Equality, site_field_expr, new NullLiteral (loc), loc), s, loc); + Statement init = new If (new Binary (Binary.Operator.Equality, site_field_expr, new NullLiteral (loc)), s, loc); init.Emit (ec); } @@ -949,7 +950,7 @@ namespace Mono.CSharp sealed class DynamicSiteClass : HoistedStoreyClass { public DynamicSiteClass (TypeDefinition parent, MemberBase host, TypeParameters tparams) - : base (parent, MakeMemberName (host, "DynamicSite", parent.DynamicSitesCounter, tparams, Location.Null), tparams, Modifiers.STATIC) + : base (parent, MakeMemberName (host, "DynamicSite", parent.DynamicSitesCounter, tparams, Location.Null), tparams, Modifiers.STATIC, MemberKind.Class) { parent.DynamicSitesCounter++; }