D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 14745 - Qualifiers rejected for delegate literals
Summary: Qualifiers rejected for delegate literals
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: pull, rejects-valid
Depends on:
Blocks:
 
Reported: 2015-06-28 19:11 UTC by timon.gehr
Modified: 2015-10-04 18:22 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description timon.gehr 2015-06-28 19:11:03 UTC
This code is (correctly) accepted by DMD 2.067:

void main(){
    auto foo1()pure immutable{ return 0; }
    auto foo2()pure const{ return 0; } 
}

But this is not:

void main(){
    auto dg1=()pure immutable{ return 0; };
    auto dg2=()pure const{ return 0; };
}

Both should compile. (There should be no difference in how qualifiers are handled for named and anonymous nested functions.)
Comment 2 github-bugzilla 2015-08-30 14:11:47 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/6b42d4df211895b225866f52bdef4e156949c6ce
fix Issue 14745 - Qualifiers rejected for delegate literals

https://github.com/D-Programming-Language/dmd/commit/cd96e7ad1af71c601484d474be9f03dc2a3d2fd5
Merge pull request #4800 from 9rnsr/fix14745

Issue 14745 - Qualifiers rejected for delegate literals
Comment 3 Kenji Hara 2015-09-02 08:12:51 UTC
I've forgotten to update grammar.

https://github.com/D-Programming-Language/dlang.org/pull/1086
Comment 4 github-bugzilla 2015-09-02 08:22:54 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dlang.org

https://github.com/D-Programming-Language/dlang.org/commit/82b23acdd383b4d5a2249448c8fe565ecfd5fa4e
fix Issue 14745 - Qualifiers rejected for delegate literals

https://github.com/D-Programming-Language/dlang.org/commit/d8330a1739cb4327e96a66bbc6db1be7c96096a7
Merge pull request #1086 from 9rnsr/fix14745

Issue 14745 - Qualifiers rejected for delegate literals