summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2016-12-07 00:35:02 -0800
committerSom Snytt <som.snytt@gmail.com>2016-12-14 12:34:00 -0800
commit9df6d16f9b303caa98feb2ccd179352bd646c101 (patch)
tree09aa2a9be66e7ef89c09956303507293d67711c9 /test/files/run
parentb91b415b4fccfc46520dcd3f128b4b09d19d74f0 (diff)
downloadscala-9df6d16f9b303caa98feb2ccd179352bd646c101.tar.gz
scala-9df6d16f9b303caa98feb2ccd179352bd646c101.tar.bz2
scala-9df6d16f9b303caa98feb2ccd179352bd646c101.zip
SI-10097 Error if no non-implicit case class param
Case class must have a non-implicit param list. Error early, error often. Also update spec to say that class implicitly gets a non-implicit parameter section if it doesn't have one, and that a case class must have one.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/patmat-exprs.scala4
-rw-r--r--test/files/run/t5907.scala2
2 files changed, 3 insertions, 3 deletions
diff --git a/test/files/run/patmat-exprs.scala b/test/files/run/patmat-exprs.scala
index 7ca5fd3063..d18df9c714 100644
--- a/test/files/run/patmat-exprs.scala
+++ b/test/files/run/patmat-exprs.scala
@@ -344,13 +344,13 @@ trait Pattern {
}
- case class Zero[T] (implicit num: NumericOps[T]) extends Leaf[T] {
+ case class Zero[T]()(implicit num: NumericOps[T]) extends Leaf[T] {
def derivative(variable: Var[T]) = Zero[T]
def eval(f: Any => Any) = num.zero
override def toString = "0"
}
- case class One[T] (implicit num: NumericOps[T]) extends Leaf[T] {
+ case class One[T]()(implicit num: NumericOps[T]) extends Leaf[T] {
def derivative(variable: Var[T]) = Zero[T]
def eval(f: Any => Any) = num.one
override def toString = "1"
diff --git a/test/files/run/t5907.scala b/test/files/run/t5907.scala
index a005e9fbd3..81fc43e3f5 100644
--- a/test/files/run/t5907.scala
+++ b/test/files/run/t5907.scala
@@ -86,7 +86,7 @@ object Test extends App {
}
}
-case class C1(implicit x: Int) {
+case class C1()(implicit x: Int) {
override def toString = s"c1: $x"
}
case class C2()(y: Int) {