[Issue 7653] remove "function literals cannot be class members" annoyance

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 3 05:58:57 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=7653


Vladimir Panteleev <thecybershadow at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow at gmail.com
           Severity|normal                      |enhancement


--- Comment #1 from Vladimir Panteleev <thecybershadow at gmail.com> 2014-02-03 15:58:53 EET ---
Another test case:

enum x = { return 5; }; // allowed

struct S
{
    enum y = { return 5; }; // forbidden
}

Looking at the compiler code and its history, it looks like an artificial
limitation left in the code from ancient times (dmd 0.90).

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list