| 1 |
// PERMUTE_ARGS: -d -dw |
| 2 |
// segfault on DMD0.150, never failed if use typeid() instead. |
| 3 |
/* |
| 4 |
TEST_OUTPUT: |
| 5 |
--- |
| 6 |
fail_compilation/fail121.d(24): Error: no property `typeinfo` for `list[1]` of type `fail121.myobject` |
| 7 |
fail_compilation/fail121.d(12): struct `myobject` defined here |
| 8 |
fail_compilation/fail121.d(24): Error: no property `typeinfo` for `i` of type `int` |
| 9 |
--- |
| 10 |
*/ |
| 11 |
|
| 12 |
struct myobject |
| 13 |
{ |
| 14 |
TypeInfo objecttype; |
| 15 |
void* offset; |
| 16 |
} |
| 17 |
|
| 18 |
myobject[] list; |
| 19 |
|
| 20 |
void foo() |
| 21 |
{ |
| 22 |
int i; |
| 23 |
|
| 24 |
list[1].typeinfo = i.typeinfo; |
| 25 |
} |