Bugzilla – Bug 319436
[ANONYMOUS METHODS] [PATCH] anonymous method seems to be public
Last modified: 2007-09-16 10:57:26 UTC
---- Reported by ats@cs.rit.edu 2005-10-30 10:26:26 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: gmcs produces CS0050 and CS0051 errors when compiling <http://www.cs.rit.edu/~ats/ cs-2005-1/code/adt/tree/Set.cs>. The file compiles and executes properly on VS 2005 beta 2 and I do not believe that the errors are warranted. Steps to reproduce the problem: 1. gmcs /m:Axel.ADT.Tree.SetTest Set.cs ../IContainer.cs ../Test.cs 2. 3. Actual Results: Set.cs(116,32): error CS0050: Inconsistent accessibility: return type `Axel.ADT.Tree.Set<Element>.Node' is less accessible than method `Axel.ADT.Tree.Set`1.<#AnonymousMethod>0()' Internal(1,1):: `Set<Element>.Node' (name of symbol related to previous error Set.cs(119,33): error CS0051: Inconsistent accessibility: parameter type `Axel.ADT.Tree.Set<Element>.Node' is less accessible than method `Axel.ADT.Tree.Set`1.<#AnonymousMethod>1(Axel.ADT.Tree.Set<Element>.Node)' Set.cs(127,29): error CS0051: Inconsistent accessibility: parameter type `Axel.ADT.Tree.Set<Element>.Node' is less accessible than method `Axel.ADT.Tree.Set`1.<#AnonymousMethod>2(Axel.ADT.Tree.Set<Element>.Node)' Compilation failed: 3 error(s), 0 warnings Expected Results: no errors How often does this happen? always Additional Information: the other files can be found relative to the link given above. ---- Additional Comments From atsushi@ximian.com 2006-03-12 08:57:21 MST ---- I came across the same problem (I think). Here is much easier test to reproduce: using System; using System.Collections.Generic; public class Test { class Foo { } List<Foo> list; public void Bar (bool v) { list.RemoveAll (delegate (Foo val) { return v; }); } } ---- Additional Comments From atsushi@ximian.com 2006-03-15 17:34:53 MST ---- Created an attachment (id=168756) proposed fix ---- Additional Comments From miguel@ximian.com 2006-10-07 12:08:05 MST ---- Atsushi, does this problem still persist? I do not get this problem with current SVN, the code above builds fine. ---- Additional Comments From miguel@ximian.com 2006-10-08 15:23:47 MST ---- Setting the bug to NEEDINFO Imported an attachment (id=168756) Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Panther</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".
I fixed same issue recently