Bugzilla – Bug 320305
[GMCS] Cannot compile generics anonymous method
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by marek.safar@seznam.cz 2006-02-10 18:57:23 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: Steps to reproduce the problem: using System; using System.Collections.Generic; using System.Text; namespace A { public class StringEnum { public readonly string Value; readonly string[] aliases; protected StringEnum(string v) { Value = v; } protected static T Parse<T>(string value, params T[] args) where T : StringEnum { T item = Array.Find<T>(args, delegate(T t) { if (t.Value == value) return true; return Array.Exists<string>(t.aliases, delegate (string s) { return s == value; }); }); if (item == null) throw new ArgumentOutOfRangeException("value", value); return item; } } } Actual Results: (19,15): error CS0029: Cannot implicitly convert type `System.Nullable<T >' to `T' Expected Results: No error (except CS5001) How often does this happen? 100% Additional Information: ---- Additional Comments From marek.safar@seznam.cz 2006-02-12 05:29:36 MST ---- It was corlib bug. Unknown operating system unknown. Setting to default OS "Other".