summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/diag8894.d
blob: 9b66bf0f032ac67ab2bf24212bde1c5952d2c16d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
TEST_OUTPUT:
---
fail_compilation/diag8894.d(16): Error: no property 'x' for type 'Foo'
fail_compilation/diag8894.d(17): Error: no property 'y' for type 'Foo'
fail_compilation/diag8894.d(18): Error: no property 'x' for type 'Foo'
fail_compilation/diag8894.d(19): Error: no property 'x' for type 'Foo'
---
*/

struct Foo { }

void main()
{
    Foo f;
    f.x;           // UFCS getter1
    f.y!int;       // UFCS getter2
    f.x     = 10;  // UFCS setter1
    f.x!int = 10;  // UFCS setter2
}