Bugzilla – Bug 322298
[GMCS] Compilation error with anon method returning a delegate
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by hys545@dreamwiz.com 2006-10-05 23:09:48 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: gmcs -t:library -r:../IronMath.dll -r:System.Drawing.dll -r:System.Design.dll -out:../IronPython.dll -recurse:IronPython/*.cs IronPython/Compiler/MethodBinder.cs(963,22): warning CS0219: The variable `returnType' is assigned but its value is never used IronPython/Compiler/AST/Statements.cs(529,19): warning CS0219: The variable `beforeFinally' is assigned but its value is never used IronPython/Hosting/PythonEngine.cs(761,17): error CS0029: Cannot implicitly convert type `TDelegate' to `TDelegate' IronPython/Hosting/PythonEngine.cs(761,17): The type has two conflicting definitions, one comes from IronPython, Version=0.0.0.0, Culture=neutral and the other from IronPython, Version=0.0.0.0, Culture=neutralerror) IronPython/Hosting/PythonEngine.cs(789,17): error CS0029: Cannot implicitly convert type `TDelegate' to `TDelegate' IronPython/Hosting/PythonEngine.cs(789,17): The type has two conflicting definitions, one comes from IronPython, Version=0.0.0.0, Culture=neutral and the other from IronPython, Version=0.0.0.0, Culture=neutralerror) Compilation failed: 2 error(s), 2 warnings Steps to reproduce the problem: 1. 2. 3. Actual Results: Expected Results: How often does this happen? Additional Information: ---- Additional Comments From vargaz@gmail.com 2006-10-06 05:49:59 MST ---- A testcase: <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< using System; using System.Runtime.InteropServices; using System.Collections.Generic; class Tests { public delegate T ModuleBinder<T>(object o); public ModuleBinder<TDelegate> CreateMethodUnscoped<TDelegate>() { return delegate(object o) { return (TDelegate)(object)null; }; } } >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> This prevents recent IronPython snapshots from being compiled by mono ---- Additional Comments From vargaz@gmail.com 2006-10-07 08:03:28 MST ---- This now blocks IronPython 1.0.1 from compiling. ---- Additional Comments From martin@ximian.com 2006-10-12 15:11:28 MST ---- Fixed in SVN. Unknown operating system unknown. Setting to default OS "Other".