D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4029 - CTFE: cannot invoke delegate returned from function
Summary: CTFE: cannot invoke delegate returned from function
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2010-03-30 00:30 UTC by Don
Modified: 2014-02-16 15:26 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Don 2010-03-30 00:30:49 UTC
string delegate() bug4029a()
{
    return { return "abc"; };
}

string bug4029()
{
   return bug4029a()();
}

static assert(bug4029());

----
bug.d(8): Error: cannot evaluate bug4029a()() at compile time
bug.d(11): Error: cannot evaluate bug4029() at compile time
bug.d(11): Error: static assert  (bug4029()) is not evaluatable at compile time
Comment 1 Walter Bright 2010-04-01 13:54:50 UTC
changeset 429
Comment 2 Don 2010-04-09 19:22:03 UTC
Fixed DMD1.058 and DMD2.043.