dmd/compiler/test/compilable/test18775.d
2022-07-09 18:53:07 +02:00

20 lines
299 B
D

// REQUIRED_ARGS: -de
struct Foo { }
struct Bar {
deprecated
@property Foo foo() { return Foo.init; }
alias foo this;
}
void test(Bar bar) { }
void main()
{
Bar bar;
// test lookup will be satisfied via ufcs, not alias, so it must not deprecation warn foo!
bar.test;
}