Mercurial > projects > ldc
view tests/mini/foreach10.d @ 1193:c271eca933fb
Don't expand tilde ('~') in paths unless it's the first character of the path
in question.
This should fix #255.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Fri, 03 Apr 2009 16:35:47 +0200 |
parents | 8baf611f0009 |
children |
line wrap: on
line source
module foreach10; extern(C) int printf(char*, ...); void main() { char* last = null; printf("The addresses should increment:\n"); foreach (ref c; "bar") { auto a = { printf("%x '%c'\n", c, c); return &c; }; auto nw = a(); printf("ptr = %p\n", nw); if (last != null) assert(nw == last+1); last = nw; } }