| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/diag8894.d(20): Error: no property `x` for `f` of type `diag8894.Foo` |
| 5 |
fail_compilation/diag8894.d(15): struct `Foo` defined here |
| 6 |
fail_compilation/diag8894.d(21): Error: no property `y` for `f` of type `diag8894.Foo` |
| 7 |
fail_compilation/diag8894.d(15): struct `Foo` defined here |
| 8 |
fail_compilation/diag8894.d(22): Error: no property `x` for `f` of type `diag8894.Foo` |
| 9 |
fail_compilation/diag8894.d(15): struct `Foo` defined here |
| 10 |
fail_compilation/diag8894.d(23): Error: no property `x` for `f` of type `diag8894.Foo` |
| 11 |
fail_compilation/diag8894.d(15): struct `Foo` defined here |
| 12 |
--- |
| 13 |
*/ |
| 14 |
|
| 15 |
struct Foo { } |
| 16 |
|
| 17 |
void main() |
| 18 |
{ |
| 19 |
Foo f; |
| 20 |
f.x; // UFCS getter1 |
| 21 |
f.y!int; // UFCS getter2 |
| 22 |
f.x = 10; // UFCS setter1 |
| 23 |
f.x!int = 10; // UFCS setter2 |
| 24 |
} |