summaryrefslogblamecommitdiff
path: root/test/files/pos/t4842.scala
blob: 17ff684833d261baa9f080f4e37fa6817fd92b97 (plain) (tree)

























                                                                                                      
class Foo (x: AnyRef) {
  def this() = {
    this(new { } ) // okay
  }
}


class Blerg (x: AnyRef) {
   def this() = {
     this(new { class Bar { println(Bar.this); new { println(Bar.this) } }; new Bar } ) // okay
   }
}


class Outer {
	class Inner (x: AnyRef) {
	  def this() = {
	    this(new { class Bar { println(Bar.this); new { println(Bar.this) } }; new Bar } ) // okay
	  }

	  def this(x: Boolean) = {
	    this(new { println(Outer.this) } ) // okay
	  }
	}
}