mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
22 lines
245 B
D
22 lines
245 B
D
struct Base {
|
|
int i;
|
|
}
|
|
|
|
struct A {
|
|
Base base;
|
|
alias base this;
|
|
}
|
|
|
|
struct B {
|
|
A a;
|
|
alias a this;
|
|
}
|
|
|
|
auto asGeneric(inout ref Base block) @nogc {
|
|
return █
|
|
}
|
|
|
|
B* thingie;
|
|
auto foo() {
|
|
return asGeneric(*thingie);
|
|
}
|