summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2016-12-09 09:53:30 -0800
committerSom Snytt <som.snytt@gmail.com>2016-12-14 20:14:45 -0800
commitb775f4f58098d7f79155b3fe00c0bdb0eabf3d84 (patch)
treea4ba8d61638bbdd9a42c7a6db7a09df9ac0777d0 /test/files/run
parent32a05ddfef09ac27904d9771ddf0ed8b4380e94a (diff)
downloadscala-b775f4f58098d7f79155b3fe00c0bdb0eabf3d84.tar.gz
scala-b775f4f58098d7f79155b3fe00c0bdb0eabf3d84.tar.bz2
scala-b775f4f58098d7f79155b3fe00c0bdb0eabf3d84.zip
SI-10097 Adapt unless -Xsource:2.13
For 2.12 migration, insert missing case class param section, strip caseaccessor from implicit paramsection, and deprecate the adaptation.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t10097.check3
-rw-r--r--test/files/run/t10097.flags1
-rw-r--r--test/files/run/t10097.scala6
3 files changed, 10 insertions, 0 deletions
diff --git a/test/files/run/t10097.check b/test/files/run/t10097.check
new file mode 100644
index 0000000000..0e8b96061c
--- /dev/null
+++ b/test/files/run/t10097.check
@@ -0,0 +1,3 @@
+t10097.scala:2: warning: case classes should have a non-implicit parameter list; adapting to 'case class C()(...)'
+case class C(implicit c: Int)
+ ^
diff --git a/test/files/run/t10097.flags b/test/files/run/t10097.flags
new file mode 100644
index 0000000000..dcc59ebe32
--- /dev/null
+++ b/test/files/run/t10097.flags
@@ -0,0 +1 @@
+-deprecation
diff --git a/test/files/run/t10097.scala b/test/files/run/t10097.scala
new file mode 100644
index 0000000000..a16be897cc
--- /dev/null
+++ b/test/files/run/t10097.scala
@@ -0,0 +1,6 @@
+
+case class C(implicit c: Int)
+
+object Test extends App {
+ assert(C()(42).productArity == 0)
+}