https://bugzilla.novell.com/show_bug.cgi?id=360455
Summary: gmcs erroneously raises "x is never used" warning
Product: Mono: Compilers
Version: 1.9.0
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
If an event in a generic class of T whose delegate signature does not reference
T is defined, gmcs will erroneously warn that said event is never used.
For the attached test case, the following is the output of gmcs 1.9.0.0:
[EMAIL PROTECTED]:~/Desktop$ gmcs gmcs-invalid-warning.cs
gmcs-invalid-warning.cs(7,31): warning CS0067: The event `TestGeneric<T>.Event'
is never used
Compilation succeeded - 1 warning(s)
I am noticing this in Banshee in a few places, for instance:
http://svn.gnome.org/svn/banshee/trunk/banshee/src/Core/Hyena.Gui/Hyena.Gui.Theatrics/Stage.cs
When compiling this file, gmcs says that the `Iteration' event is never used,
even though it clearly is (raised in `OnIteration').
I have not been able to test this absolutely on older gmcs releases, but I do
recall seeing the warning on 1.2.6 as well.
Also to note: the code works just fine at runtime - this seems only to be a
problem resolving when to warn in the compiler, so it's not severe at all, just
a bit annoying.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs