class C { x () : void { ignore (Hoo (3)); // E: wrong number of parameters in call, needed 0, got 1 } protected this () {} } class M { static g () : C { C(3) } // E: type `C' has no accessible constructors } class Hoo { x : int; } class Bar { public xx : int; public this () {} } class Foo : Bar { static xs : int; // OK ms () : int { xs } // OK xi : int; // OK mi () : int { xi + ms () } // OK mi2 () : int { mi () + ms () }// OK static ms2 () : int { xi } // E: trying to access an instance member Foo.xi from a static method static ms3 () : int { mi () } // E: trying to access an instance member Foo.mi from a static method static new xx : int; // OK yy () : int { xx } // OK // was `ambiguity between `this.xx' and a static field `Foo.xx'` } class H { private this () { } } class DD { m () : DD { this } // OK static f () : DD { this } // E: `this' used outside method m1 () : void { this () } // E: this (...) m2 () : void { base () } // E: base (...) static f1 () : void { def x = 1; x = H } // E: type `H' has no accessible constructors }