| 1 |
void test12523(inout(int)) |
| 2 |
{ |
| 3 |
void check(T)() |
| 4 |
{ |
| 5 |
T[] a; |
| 6 |
foreach (ref e; a) |
| 7 |
static assert(is(typeof(e) == T)); |
| 8 |
} |
| 9 |
|
| 10 |
check!(int)(); |
| 11 |
check!(inout(int))(); |
| 12 |
check!(inout(const(int)))(); |
| 13 |
check!(const(int))(); |
| 14 |
check!(immutable(int))(); |
| 15 |
} |