aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2015-02-15 00:42:50 +0100
committerGuillaume Martres <smarter@ubuntu.com>2015-02-15 00:43:12 +0100
commit5a81c5db9d3e4b16ff4ac05cc3ee54f81ab91059 (patch)
treeb352ac8e88c9e44b6043cbdea883c37099bfcf48 /tests
parent2e72811fb1cedb94c7967acf96c92172f010a20b (diff)
downloaddotty-5a81c5db9d3e4b16ff4ac05cc3ee54f81ab91059.tar.gz
dotty-5a81c5db9d3e4b16ff4ac05cc3ee54f81ab91059.tar.bz2
dotty-5a81c5db9d3e4b16ff4ac05cc3ee54f81ab91059.zip
Fix tests/pos/{i143,extmethods}.scala: value classes must have exactly one val param
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/extmethods.scala2
-rw-r--r--tests/pos/i143.scala4
2 files changed, 2 insertions, 4 deletions
diff --git a/tests/pos/extmethods.scala b/tests/pos/extmethods.scala
index c8c49b12d..7533a4336 100644
--- a/tests/pos/extmethods.scala
+++ b/tests/pos/extmethods.scala
@@ -1,5 +1,5 @@
trait That1[A]
-class T[A, This <: That1[A]] extends AnyVal {
+class T[A, This <: That1[A]](val x: Int) extends AnyVal {
self: This =>
var next: This = _
final def loop(x: This, cnt: Int): Int = loop(x, cnt + 1)
diff --git a/tests/pos/i143.scala b/tests/pos/i143.scala
index 8804b20ce..1cbccc281 100644
--- a/tests/pos/i143.scala
+++ b/tests/pos/i143.scala
@@ -5,9 +5,7 @@ import dotty.tools.dotc.core.Denotations._
import dotty.tools.dotc.core.Symbols._
import dotty.tools.dotc.core.Contexts._
-class TC5 extends AnyVal {
- implicit val ctx: Context = ???
-
+class TC5(val ctx: Context) extends AnyVal {
def candidates(mbr: SingleDenotation): Boolean = {
mbr.symbol.denot(ctx).exists
}