X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2Freflection.cs;h=24f25951d583c3ca258fe6b73196ea20036a8f9d;hb=01df432af43ed3dd9a225b13e0ebcce9a8a34a5a;hp=2de023c18fe48f52955aa3aa95993c9820562791;hpb=9b3232e7df30dc895bf1d033196d106ae555c4a0;p=mono.git diff --git a/mcs/mcs/reflection.cs b/mcs/mcs/reflection.cs index 2de023c18fe..24f25951d58 100644 --- a/mcs/mcs/reflection.cs +++ b/mcs/mcs/reflection.cs @@ -48,6 +48,8 @@ namespace Mono.CSharp public ReflectionImporter (ModuleContainer module, BuiltinTypes builtin) : base (module) { + IgnoreCompilerGeneratedField = false; + Initialize (builtin); } @@ -83,7 +85,7 @@ namespace Mono.CSharp { // It can be used more than once when importing same assembly // into 2 or more global aliases - var definition = GetAssemblyDefinition (assembly); + GetAssemblyDefinition (assembly); // // This part tries to simulate loading of top-level @@ -98,7 +100,7 @@ namespace Mono.CSharp all_types = e.Types; } - ImportTypes (all_types, targetNamespace, definition.HasExtensionMethod); + ImportTypes (all_types, targetNamespace, true); } public ImportedModuleDefinition ImportModule (Module module, RootNamespace targetNamespace) @@ -219,7 +221,7 @@ namespace Mono.CSharp // public bool Create (AppDomain domain, AssemblyBuilderAccess access) { -#if STATIC +#if STATIC || FULL_AOT_RUNTIME throw new NotSupportedException (); #else ResolveAssemblySecurityAttributes (); @@ -418,7 +420,7 @@ namespace Mono.CSharp default_references.Add ("System"); default_references.Add ("System.Xml"); -#if NET_2_1 +#if MOBILE default_references.Add ("System.Net"); default_references.Add ("System.Windows"); default_references.Add ("System.Windows.Browser"); @@ -440,9 +442,9 @@ namespace Mono.CSharp return Path.GetDirectoryName (typeof (object).Assembly.Location); } - public override bool HasObjectType (Assembly assembly) + public override Assembly HasObjectType (Assembly assembly) { - return assembly.GetType (compiler.BuiltinTypes.Object.FullName) != null; + return assembly.GetType (compiler.BuiltinTypes.Object.FullName) == null ? null : assembly; } public override Assembly LoadAssemblyFile (string assembly, bool isImplicitReference) @@ -547,4 +549,4 @@ namespace Mono.CSharp } } } -} \ No newline at end of file +}