Bugzilla – Bug 318083
[GMCS] Incorrect CS0169 warning in generic class
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by emrysk@gmail.com 2005-05-26 17:11:38 MST ---- The following chunk of code will claim "CS0169: The private field 'MyEnumerator`1._e' is never used" with Mono 1.1.7. The test case is an implementation of IEnumerator<>. (Sorry about the length. I'm in a bit of a rush and didn't have time to try and shorten it.) --- using System.Collections.Generic; class MyEnumerator<T> : IEnumerator<T> { IEnumerator<T> _e; public T Current { get { return _e.Current; } } object System.Collections.IEnumerator.Current { get { return _e.Current; } } public MyEnumerator(IEnumerable<T> a) { _e = a.GetEnumerator(); } public bool MoveNext() { return _e.MoveNext(); } public void Reset() { _e.Reset(); } public void Dispose() { _e.Dispose(); } } class Program { static void Main() { } } ---- Additional Comments From martin@ximian.com 2005-06-10 13:16:43 MST ---- Fixed in SVN. Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Ubuntu Linux 5.04 (Hoary)</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".