mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 19:03:13 +01:00
19 lines
183 B
D
19 lines
183 B
D
module bar;
|
|
|
|
class S
|
|
{
|
|
int i;
|
|
final int foo()
|
|
{
|
|
return i;
|
|
}
|
|
}
|
|
|
|
void main()
|
|
{
|
|
auto s = new S;
|
|
s.i = 42;
|
|
auto dg = &s.foo;
|
|
assert(dg() == 42);
|
|
}
|