diff options
Diffstat (limited to 'tests/untried/neg/t4842.scala')
-rw-r--r-- | tests/untried/neg/t4842.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/untried/neg/t4842.scala b/tests/untried/neg/t4842.scala new file mode 100644 index 000000000..c6244efda --- /dev/null +++ b/tests/untried/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 +} |