Bug 322298 (MONO79592) - [GMCS] Compilation error with anon method returning a delegate
Summary: [GMCS] Compilation error with anon method returning a delegate
Status: RESOLVED FIXED
Alias: MONO79592
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Major
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-06 06:09 UTC by YunSong Hwang
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 20:12:10 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".