Fix corlib self referencing bug.
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 31 Aug 2010 17:37:13 +0000 (14:37 -0300)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 31 Aug 2010 17:43:42 +0000 (14:43 -0300)
commit111aa402a06f4f1a4e2c2bf0962248d21177bde7
tree068cd4ac351e3491d0eff21de69f91970564b929
parent5874c412f9835a90ba25620c45b162896f8a9f6d
Fix corlib self referencing bug.

In mcs/class/corlib/System.Reflection.Emit:

* TypeBuilder.cs (DefineDefaultConstructor): If the resolved
type is either typeof (object) or typeof (ValueType) we backout
to the non resolved type as it might be one of the corlib's
typebuilders.

In mcs/mcs:

* rootcontext.cs (CloseTypes): Only apply the enum hack for
corlib here.

* rootcontext.cs (EmitCode): Do the corlib basic type hack
here before types are emitted. This is required since EmitType
produce type initializers, which derive from ValueType and must
be able to see the TypeBuilder version of it.
mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
mcs/mcs/rootcontext.cs