class Test
{
        string mystring;

        this(string mystring)
        {
                this.mystring = mystring;
        }
        
        void foo()
        {
        writeln("test");
        writeln(mystring);
        }
        foo();
}

source\app.d(303): Error: function declaration without return type. (Note that c
onstructors are always named 'this')
source\app.d(303): Error: no identifier for declarator foo()
FAIL .dub\build\application-debug-windows-x86-dmd_2066-EF7A441AE01F652132F0A1ED8
B06EB48\ seismodownloader executable
Error executing command run: dmd failed with exit code 1.

What I am doing wrong?

Reply via email to