D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 9415 - delegate inference should make function literal impure
Summary: delegate inference should make function literal impure
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: pull, rejects-valid
Depends on:
Blocks:
 
Reported: 2013-01-28 04:33 UTC by Kenji Hara
Modified: 2013-03-03 15:02 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 Kenji Hara 2013-01-28 04:33:32 UTC
From: http://forum.dlang.org/thread/aldgsmoserwuvtfxzajn@forum.dlang.org

This code should work, but doesn't.

void main() {
    int z;
    typeof((int a){return z;}) dg;
    dg = (int a){return z;};
}
Comment 2 github-bugzilla 2013-03-03 14:41:38 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/87ae665a998286324fbee138629b8ff782108eb2
fix Issue 9415 - delegate inference should make function literal impure

https://github.com/D-Programming-Language/dmd/commit/a5ab2c3c4a63288c83226e891d7a6200b2883a09
Merge pull request #1572 from 9rnsr/fix9415

Issue 9415 - delegate inference should make function literal impure