gcc/testsuite/gdc.test/compilable/test18775.d
raw| 1 | // REQUIRED_ARGS: -de |
| 2 | |
| 3 | struct Foo { } |
| 4 | |
| 5 | struct Bar { |
| 6 | deprecated |
| 7 | @property Foo foo() { return Foo.init; } |
| 8 | |
| 9 | alias foo this; |
| 10 | } |
| 11 | |
| 12 | void test(Bar bar) { } |
| 13 | |
| 14 | void main() |
| 15 | { |
| 16 | Bar bar; |
| 17 | |
| 18 | // test lookup will be satisfied via ufcs, not alias, so it must not deprecation warn foo! |
| 19 | bar.test; |
| 20 | } |