Bug 320305 (MONO77527) - [GMCS] Cannot compile generics anonymous method
Summary: [GMCS] Cannot compile generics anonymous method
Status: RESOLVED FIXED
Alias: MONO77527
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Raja R Harinath
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-11 01:57 UTC by Marek Safar
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:47:57 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".