summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-06-26 00:58:02 -0700
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-06-26 00:58:02 -0700
commit5b506690356ffec3e83984f9098b269b1a02159d (patch)
tree29fb5b0ea49d987fd0dfece9f6742f3074436865 /test/files
parent643a143504106de439451a4dcb7f76fc8df6b73c (diff)
parente7feeaafe6ba83171714ca78b06afabb9320d20d (diff)
downloadscala-5b506690356ffec3e83984f9098b269b1a02159d.tar.gz
scala-5b506690356ffec3e83984f9098b269b1a02159d.tar.bz2
scala-5b506690356ffec3e83984f9098b269b1a02159d.zip
Merge pull request #769 from hubertp/topic/t4842-followup
Minor followup on SI-4842: remove awkward condition. Review by @retronym
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/t4842.check7
-rw-r--r--test/files/neg/t4842.scala (renamed from test/files/neg/t4842b.scala)4
-rw-r--r--test/files/neg/t4842a.check4
-rw-r--r--test/files/neg/t4842a.scala3
-rw-r--r--test/files/neg/t4842b.check4
5 files changed, 11 insertions, 11 deletions
diff --git a/test/files/neg/t4842.check b/test/files/neg/t4842.check
new file mode 100644
index 0000000000..b53bbdbd15
--- /dev/null
+++ b/test/files/neg/t4842.check
@@ -0,0 +1,7 @@
+t4842.scala:2: error: self constructor arguments cannot reference unconstructed `this`
+ def this(x: Int) = this(new { println(Foo.this)}) // error
+ ^
+t4842.scala:6: error: self constructor arguments cannot reference unconstructed `this`
+ def this() = { this(???)(new { println(TypeArg.this.x) } ); println("next") } // error
+ ^
+two errors found
diff --git a/test/files/neg/t4842b.scala b/test/files/neg/t4842.scala
index a7996cc061..c6244efda7 100644
--- a/test/files/neg/t4842b.scala
+++ b/test/files/neg/t4842.scala
@@ -1,3 +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
}
diff --git a/test/files/neg/t4842a.check b/test/files/neg/t4842a.check
deleted file mode 100644
index 39d77bfc48..0000000000
--- a/test/files/neg/t4842a.check
+++ /dev/null
@@ -1,4 +0,0 @@
-t4842a.scala:2: error: self constructor arguments cannot reference unconstructed `this`
- def this(x: Int) = this(new { println(Foo.this)}) // error
- ^
-one error found
diff --git a/test/files/neg/t4842a.scala b/test/files/neg/t4842a.scala
deleted file mode 100644
index 78360effb4..0000000000
--- a/test/files/neg/t4842a.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-class Foo (x: AnyRef) {
- def this(x: Int) = this(new { println(Foo.this)}) // error
-}
diff --git a/test/files/neg/t4842b.check b/test/files/neg/t4842b.check
deleted file mode 100644
index c7ccd5e059..0000000000
--- a/test/files/neg/t4842b.check
+++ /dev/null
@@ -1,4 +0,0 @@
-t4842b.scala:2: error: self constructor arguments cannot reference unconstructed `this`
- def this() = { this(???)(new { println(TypeArg.this.x) } ); println("next") } // error
- ^
-one error found