Thread overview
Code with no effect compiles okay
Apr 06, 2005
Derek Parnell
Apr 06, 2005
zwang
Apr 07, 2005
Regan Heath
April 06, 2005
[file: test.d]
class Foo {}
void main() { new Foo; }


[CMD: dmd -w test.d ]

-- 
Derek Parnell
Melbourne, Australia
http://www.dsource.org/projects/build/ v1.19 released 04/Apr/2005
http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage
6/04/2005 2:41:24 PM
April 06, 2005
Derek Parnell wrote:
> [file: test.d]
> class Foo {}
> void main() { new Foo; }
> 
> 
> [CMD: dmd -w test.d ]
> 

There's nothing wrong with the code. I would be surprised if it didn't compile.
April 07, 2005
On Thu, 07 Apr 2005 00:46:05 +0800, zwang <nehzgnaw@gmail.com> wrote:
> Derek Parnell wrote:
>> [file: test.d]
>> class Foo {}
>> void main() { new Foo; }
>>   [CMD: dmd -w test.d ]
>>
>
> There's nothing wrong with the code. I would be surprised if it didn't compile.

True. IIRC one of the goals of D was to make meaningless code illegal. Maybe that is limited to where it commonly causes a bug eg.

a == b; //programmer meant a = b;

Regan