view tests/parser/struct_method_1.d @ 179:2a1a635bd531

Changes the way messages can be displayed. Also added a toString to DType's for type printing.
author Anders Johnsen <skabet@gmail.com>
date Fri, 25 Jul 2008 01:21:07 +0200
parents cd066f3b539a
children
line wrap: on
line source

module struct_method_1;

struct A
{
    int x;
    int foo(int i)
    {
        return i;
    }
}

int main()
{
    A a;
    a.x = 6;
    return a.foo(a.x);
}