Class declaration

Daniel Keep daniel.keep.lists at gmail.com
Fri Oct 5 03:50:34 PDT 2007



Simen Haugen wrote:
> module test;
> import std.stdio;
> 
> private protected public public private public private protected public 
> protected public private protected private public public private protected 
> protected private class T {
>  this(char[] msg) {
>   writefln(msg);
>  }
> }
> 
> void main() {
>  T t = new T("This works too :)");
> }

In an ideal world, compiling the above would produce:

Error test.d:4: programmer is being a smartass.

:3

	-- Daniel


More information about the Digitalmars-d-learn mailing list