diff options
author | Marcos Henrich <marcos.henrich@xamarin.com> | 2015-02-12 11:59:21 +0300 |
---|---|---|
committer | Marcos Henrich <marcos.henrich@xamarin.com> | 2015-02-12 11:59:21 +0300 |
commit | b3aec8113a73dae982ac514047f81874800ef6f6 (patch) | |
tree | 4f2453013286b2387b744cdc85617b2dc900afb6 /mcs/class/corlib | |
parent | 4ef4090a22d3092058106910ae27df1b61d048c2 (diff) |
[corlib] Fixes commit ceef1e2.
We want to remove the module check from GetMethodToken not SetUserEntryPoint.
Diffstat (limited to 'mcs/class/corlib')
-rw-r--r-- | mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs index 05bf17c6278..b8ce8edd87c 100644 --- a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs +++ b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs @@ -574,7 +574,8 @@ namespace System.Reflection.Emit { { if (entryPoint == null) throw new ArgumentNullException ("entryPoint"); - + if (entryPoint.DeclaringType.Module != this) + throw new InvalidOperationException ("entryPoint is not contained in this module"); throw new NotImplementedException (); } @@ -582,8 +583,7 @@ namespace System.Reflection.Emit { { if (method == null) throw new ArgumentNullException ("method"); - if (method.DeclaringType.Module != this) - throw new InvalidOperationException ("The method is not in this module"); + return new MethodToken (GetToken (method)); } |