diff options
author | Raja R Harinath <harinath@hurrynot.org> | 2006-01-09 18:21:07 +0300 |
---|---|---|
committer | Raja R Harinath <harinath@hurrynot.org> | 2006-01-09 18:21:07 +0300 |
commit | cd9cc86504c2a5e29eff7c7db807502939f2ad57 (patch) | |
tree | 0e4300e857273e073e999d2e71fae7ef466405ae /mcs/gmcs/typemanager.cs | |
parent | 29caf0024e5a60a756084ea0b9840d8d839b24b8 (diff) |
Fix #75636.
* mcs/expression.cs (Invocation.OverloadResolve): Replace reflected
override methods with their base virtual methods, rather than
skipping over them.
* gmcs/expression.cs: Likewise.
* mcs/typemanager.cs (TypeManager.GetOverride): New.
* gmcs/typemanager.cs: Likewise.
* tests/Makefile (TEST_ILS): New list of CIL test libraries.
* tests/test-483-lib.il, tests/test-483.cs: New test from #75636.
svn path=/trunk/mcs/; revision=55226
Diffstat (limited to 'mcs/gmcs/typemanager.cs')
-rw-r--r-- | mcs/gmcs/typemanager.cs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/mcs/gmcs/typemanager.cs b/mcs/gmcs/typemanager.cs index fe959f8c179..08d44f3e9c3 100644 --- a/mcs/gmcs/typemanager.cs +++ b/mcs/gmcs/typemanager.cs @@ -1774,12 +1774,10 @@ public partial class TypeManager { static public void RegisterOverride (MethodBase override_method, MethodBase base_method) { - if (method_overrides.Contains (override_method)) { - if (method_overrides [override_method] != base_method) - throw new InternalErrorException ("Override mismatch: " + override_method); - return; - } - method_overrides [override_method] = base_method; + if (!method_overrides.Contains (override_method)) + method_overrides [override_method] = base_method; + if (method_overrides [override_method] != base_method) + throw new InternalErrorException ("Override mismatch: " + override_method); } static public bool IsOverride (MethodBase m) @@ -1789,6 +1787,11 @@ public partial class TypeManager { (m is MethodBuilder || method_overrides.Contains (m)); } + static public MethodBase GetOverride (MethodBase m) + { + return (MethodBase) method_overrides [m]; + } + /// <summary> /// Returns the argument types for an indexer based on its PropertyInfo /// |