| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/fail18892.d(22): Error: no property `foo` for `a` of type `fail18892.MT` |
| 5 |
fail_compilation/fail18892.d(13): struct `MT` defined here |
| 6 |
fail_compilation/fail18892.d(23): Error: no property `foo` for `MT` of type `fail18892.MT` |
| 7 |
fail_compilation/fail18892.d(13): struct `MT` defined here |
| 8 |
--- |
| 9 |
*/ |
| 10 |
|
| 11 |
// https://issues.dlang.org/show_bug.cgi?id=18892 |
| 12 |
|
| 13 |
struct MT |
| 14 |
{ |
| 15 |
int _payload; |
| 16 |
alias _payload this; |
| 17 |
} |
| 18 |
|
| 19 |
void main() |
| 20 |
{ |
| 21 |
MT a; |
| 22 |
a.foo = 3; |
| 23 |
MT.foo = 3; |
| 24 |
} |