From: Atsushi Eno Date: Wed, 16 Nov 2005 22:47:05 +0000 (-0000) Subject: 2005-11-16 Atsushi Enomoto X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=d3e9147bef5c0c52ecb668aa9b464051984f25ed;p=mono.git 2005-11-16 Atsushi Enomoto * doc.cs : apply "override filter" also to properties. Fixed bug #76730. * test-xml-047-ref.xml test-xml-047.cs : Another override filtering test (works with gmcs). * cs1574-7.cs : fixed code format ("Line") to make it working. * cs0419-3.cs : new test for ambiguity resolution. * known-issues-gmcs : actually cs1574-7.cs is kind of regression, thus no need to be added here. svn path=/trunk/mcs/; revision=53150 --- diff --git a/mcs/errors/ChangeLog b/mcs/errors/ChangeLog index 571b11aefd6..df61662368e 100644 --- a/mcs/errors/ChangeLog +++ b/mcs/errors/ChangeLog @@ -1,3 +1,10 @@ +2005-11-16 Atsushi Enomoto + + * cs1574-7.cs : fixed code format ("Line") to make it working. + * cs0419-3.cs : new test for ambiguity resolution. + * known-issues-gmcs : actually cs1574-7.cs is kind of regression, + thus no need to be added here. + 2005-11-16 Atsushi Enomoto * cs1574-7.cs : new test to warn doc reference to interface members diff --git a/mcs/errors/cs0419-3.cs b/mcs/errors/cs0419-3.cs new file mode 100644 index 00000000000..6465c9c865e --- /dev/null +++ b/mcs/errors/cs0419-3.cs @@ -0,0 +1,16 @@ +// cs0419-3.cs: Ambiguous reference in cref attribute `XmlDocument.Load'. Assuming `System.Xml.XmlDocument.Load(System.IO.Stream)' but other overloads including `System.Xml.XmlDocument.Load(string)' have also matched +// Line: 10 +// Compiler options: -doc:dummy.xml -warnaserror -warn:4 +// +// NOTE: this error message is dependent on the order of members, so feel free to modify the message if is going not to match. + +using System.Xml; + +/// +/// +/// +public class EntryPoint +{ + static void Main () { + } +} diff --git a/mcs/errors/cs1574-7.cs b/mcs/errors/cs1574-7.cs index 6e5ff788a2b..eba9dbbf186 100644 --- a/mcs/errors/cs1574-7.cs +++ b/mcs/errors/cs1574-7.cs @@ -1,6 +1,6 @@ // cs1574-7.cs: XML comment on `A' has cref attribute `ExecuteSilently' that could not be resolved -// Compiler options: -doc:dummy.xml -warnaserror // Line: 11 +// Compiler options: -doc:dummy.xml -warnaserror /// public interface IExecutable { /// diff --git a/mcs/errors/known-issues-gmcs b/mcs/errors/known-issues-gmcs index 9606d2c5fdc..a191a5535fe 100644 --- a/mcs/errors/known-issues-gmcs +++ b/mcs/errors/known-issues-gmcs @@ -40,7 +40,6 @@ cs1528.cs cs1540-2.cs # new in GMCS cs1540-3.cs NO ERROR # new in GMCS cs1540-5.cs NO ERROR # new in GMCS -cs1574-7.cs cs1586.cs cs1641.cs cs1667-3.cs diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog index edbc1a0204d..bdf34982387 100644 --- a/mcs/mcs/ChangeLog +++ b/mcs/mcs/ChangeLog @@ -1,3 +1,8 @@ +2005-11-16 Atsushi Enomoto + + * doc.cs : apply "override filter" also to properties. + Fixed bug #76730. + 2005-11-16 Atsushi Enomoto * doc.cs : renamed FindMembers() to FindMethodBase(). For interfaces, diff --git a/mcs/mcs/doc.cs b/mcs/mcs/doc.cs index 39524039bdb..66c004c02dc 100644 --- a/mcs/mcs/doc.cs +++ b/mcs/mcs/doc.cs @@ -349,13 +349,22 @@ namespace Mono.CSharp { bindingFlags, MethodSignature.method_signature_filter, signature); + if (ml == null) + return empty_member_infos; + return FilterOverridenMembersOut (type, (MemberInfo []) ml); + } + + private static MemberInfo [] FilterOverridenMembersOut ( + Type type, MemberInfo [] ml) + { + if (ml == null) + return empty_member_infos; if (type.IsInterface) - return ml != null ? (MemberInfo []) ml : - empty_member_infos; + return ml; - ArrayList al = new ArrayList (ml.Count); - for (int i = 0; i < ml.Count; i++) { + ArrayList al = new ArrayList (ml.Length); + for (int i = 0; i < ml.Length; i++) { // Interface methods which are returned // from the filter must exist in the // target type (if there is only a @@ -371,7 +380,7 @@ namespace Mono.CSharp { MethodBase x = ml [i] as MethodBase; if (x != null) { bool overriden = false; - for (int j = 0; j < ml.Count; j++) { + for (int j = 0; j < ml.Length; j++) { if (j == i) continue; MethodBase y = ml [j] as MethodBase; @@ -416,6 +425,7 @@ namespace Mono.CSharp { type, MemberTypes.All, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance, memberName, null); + mis = FilterOverridenMembersOut (type, mis); if (mis == null || mis.Length == 0) return null; if (warn419 && IsAmbiguous (mis)) diff --git a/mcs/tests/ChangeLog b/mcs/tests/ChangeLog index c2b05360ed0..7d71f63d193 100644 --- a/mcs/tests/ChangeLog +++ b/mcs/tests/ChangeLog @@ -1,3 +1,8 @@ +2005-11-16 Atsushi Enomoto + + * test-xml-047-ref.xml test-xml-047.cs : + Another override filtering test (works with gmcs). + 2005-11-16 Atsushi Enomoto * test-xml-046-ref.xml test-xml-046.cs : new test for bug #76726. diff --git a/mcs/tests/test-xml-047-ref.xml b/mcs/tests/test-xml-047-ref.xml new file mode 100644 index 00000000000..91d51371074 --- /dev/null +++ b/mcs/tests/test-xml-047-ref.xml @@ -0,0 +1,13 @@ + + + + test-xml-047 + + + + + + + + + diff --git a/mcs/tests/test-xml-047.cs b/mcs/tests/test-xml-047.cs new file mode 100644 index 00000000000..70febc2f353 --- /dev/null +++ b/mcs/tests/test-xml-047.cs @@ -0,0 +1,12 @@ +// Compiler options: -doc:dummy.xml -warnaserror -warn:4 + +using System; + +/// +/// +/// +public class EntryPoint +{ + static void Main () { + } +}