diff options
Diffstat (limited to 'test/files/neg/t4842.scala')
-rw-r--r-- | test/files/neg/t4842.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/t4842.scala b/test/files/neg/t4842.scala new file mode 100644 index 0000000000..c6244efda7 --- /dev/null +++ b/test/files/neg/t4842.scala @@ -0,0 +1,7 @@ +class Foo (x: AnyRef) { + def this(x: Int) = this(new { println(Foo.this)}) // error +} + +class TypeArg[X](val x: X)(a: AnyRef) { + def this() = { this(???)(new { println(TypeArg.this.x) } ); println("next") } // error +} |