summaryrefslogtreecommitdiff
path: root/test/files/neg/t4842.scala
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@gmail.com>2012-06-25 09:55:31 +0200
committerHubert Plociniczak <hubert.plociniczak@gmail.com>2012-06-25 15:08:41 +0200
commite7feeaafe6ba83171714ca78b06afabb9320d20d (patch)
treeea68b214475798ebed23e1874117285f81182f72 /test/files/neg/t4842.scala
parentcfc0e18dc55b33274c1275c192ade4a8d707d635 (diff)
downloadscala-e7feeaafe6ba83171714ca78b06afabb9320d20d.tar.gz
scala-e7feeaafe6ba83171714ca78b06afabb9320d20d.tar.bz2
scala-e7feeaafe6ba83171714ca78b06afabb9320d20d.zip
Minor followup on SI-4842: remove awkward condition. Review by @retronym.
Diffstat (limited to 'test/files/neg/t4842.scala')
-rw-r--r--test/files/neg/t4842.scala7
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
+}