[Mono-bugs] [Bug 414165] Strange compiler error when using a lambda expression

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Aug 2 16:55:01 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=414165

User mono at e-tobi.net added comment
https://bugzilla.novell.com/show_bug.cgi?id=414165#c1


Tobias Grimm <mono at e-tobi.net> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |mono at e-tobi.net




--- Comment #1 from Tobias Grimm <mono at e-tobi.net>  2008-08-02 14:54:58 MDT ---
At least a workaround for the problem is:

using System;

public class Cache<KEY, VALUE> where VALUE : class
{
    private static readonly Func<KEY, VALUE> _defaultOnMissing = key =>
    {
        int x = 0;
        return null;    
    };

    private readonly Func<KEY, VALUE> _onMissing = _defaultOnMissing;

    public Cache()
    {
    }

    public Cache(Func<KEY, VALUE> onMissing)
    {
    }
}


-- 
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.


More information about the mono-bugs mailing list