Reply to Ary, > Compiling: > > --- > class X { > void bar() { > } > } > void foo() { > new X().bar(); > } > --- > > gives me: > main.d(7): found '.' when expecting ';' following 'statement' > Is this a bug or is it the intended behaviour? I can do this in Java, > C#, probably C++... > I think it's not parsing how you want it, try this: (new X()).bar();