view tests/mini/delegate3.d @ 863:6c850977a941

modified gen/linker.cpp to only append .exe suffix on windows if not already present
author elrood
date Thu, 18 Dec 2008 19:24:33 +0100
parents 331a176c1f4f
children
line wrap: on
line source

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);
}