Bug 318083 (MONO75055) - [GMCS] Incorrect CS0169 warning in generic class
Summary: [GMCS] Incorrect CS0169 warning in generic class
Status: RESOLVED FIXED
Alias: MONO75055
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-27 00:11 UTC by Sam Kaufman
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:18:32 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".