Skip to content

Commit

Permalink
Supplemental fix for issue 9148 - lambdas will be aggressively inferr…
Browse files Browse the repository at this point in the history
…ed to pure
  • Loading branch information
9rnsr committed Sep 8, 2014
1 parent 828f443 commit e0ecca7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions std/traits.d
Expand Up @@ -6370,6 +6370,9 @@ unittest
static assert(mangledName!removeDummyEnvelope ==
"_D3std6traits19removeDummyEnvelopeFAyaZAya");
int x;
static if (is(typeof({ return x; }) : int delegate() pure)) // issue 9148
static assert(mangledName!((int a) { return a+x; }) == "DFNaNbNiNfiZi"); // pure nothrow @safe @nogc
else
static assert(mangledName!((int a) { return a+x; }) == "DFNbNiNfiZi"); // nothrow @safe @nnogc
}

Expand Down

0 comments on commit e0ecca7

Please sign in to comment.