[Issue 5143] Static array of function literals

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 31 13:08:39 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=5143


Denis Derman <denis.spir at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |denis.spir at gmail.com


--- Comment #2 from Denis Derman <denis.spir at gmail.com> 2010-10-31 13:07:38 PDT ---
The bug report states an issue about func arrays, but:

    // ok
    void f () {} ;
    static void function() foo = &f ;

    // not ok
    static void function() foo = function void() {};

--> Error: non-constant expression __funcliteral1
It seems to me the issue is that one cannot initialise a function variable with
the expression of a function. (Array or not.)
What does the compiler expect there? What does the error mean? As we have
function literals, they should, I guess, be usable where other literals are
accepted.

Note:
    auto foo = function void() {};
throws the same error.

Denis

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


More information about the Digitalmars-d-bugs mailing list