Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@hurrynot.org>2005-02-10 18:49:37 +0300
committerRaja R Harinath <harinath@hurrynot.org>2005-02-10 18:49:37 +0300
commitf855e9bbcb29ac361f1eaee49eeeec862a5b9739 (patch)
tree94eacffac39c84574eb01de5f28a97dfb9137cae /mcs/tests/test-343.cs
parent3fe27b984c0bc466393c37efa095f78bdd7081b1 (diff)
In mcs:
Fix #52586, cs0121-4.cs. * decl.cs (MemberCache.DeepCopy): Rename from SetupCache. Take and return a hashtable. (MemberCache.ClearDeclaredOnly): New. (MemberCache.MemberCache): Update to change. Make a deep copy of the method_hash of a base type too. (MemberCache.AddMethods): Adapt to having a deep copy of the base type methods. Overwrite entries with the same MethodHandle so that the ReflectedType is correct. The process leaves in base virtual functions and their overrides as distinct entries. (CacheEntry): Now a class instead of a struct. It shouldn't alter matters since it was boxed in a ArrayList before. (CacheEntry.Member, CacheEntry.EntryType): Remove 'readonly' modifier. * expression.cs (Invocation.BetterFunction): Simplify. Handle the case of a virtual function and its override (choose the overload as better). (Invocation.OverloadResolve): Avoid 'override' members during 'applicable_type' calculation. In errors: * cs0121-4.cs: New test. Ensure that a param method isn't discarded if the signatures of other normal methods are different. In tests: * test-342.cs: New test for #52586. * test-343.cs: New test. Not a bugfix or regression. Added to ensure our overloading semantics are right. See errors/cs0121-4.cs for a counterpart. (Note that the related bug #59209 is not yet fixed by this) svn path=/trunk/mcs/; revision=40402
Diffstat (limited to 'mcs/tests/test-343.cs')
-rw-r--r--mcs/tests/test-343.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/mcs/tests/test-343.cs b/mcs/tests/test-343.cs
new file mode 100644
index 00000000000..794b941ffff
--- /dev/null
+++ b/mcs/tests/test-343.cs
@@ -0,0 +1,9 @@
+using System;
+
+class X {
+ static void Concat (string s1, string s2, string s3) { }
+ static void Concat (params string [] ss) {
+ throw new Exception ("Overload resolution failed");
+ }
+ static void Main () { Concat ("a", "b", "c"); }
+}