D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7298 - global static function and delegate literals
Summary: global static function and delegate literals
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2012-01-15 09:46 UTC by timon.gehr
Modified: 2015-07-09 04:13 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description timon.gehr 2012-01-15 09:46:39 UTC
the following code should compile:
auto a = (int x)=>x+1; 	       	    // fail                                     
auto b = function(int x)=>x+1; 	    // fine                                     
struct Foo {int function(int) f;}
auto s = Foo(function(int x)=>x+1); // fail
Comment 1 Don 2012-01-16 13:57:10 UTC
These examples don't involve CTFE. There isn't even any constant folding.
Comment 2 Andrej Mitrovic 2012-12-10 15:16:33 UTC
Works in 2.060, fixed?