diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/t10097.check | 4 | ||||
-rw-r--r-- | test/files/neg/t10097.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t10097b.check | 6 | ||||
-rw-r--r-- | test/files/neg/t10097b.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t10097b.scala | 3 | ||||
-rw-r--r-- | test/files/run/t10097.check | 3 | ||||
-rw-r--r-- | test/files/run/t10097.flags | 1 | ||||
-rw-r--r-- | test/files/run/t10097.scala | 6 |
8 files changed, 23 insertions, 2 deletions
diff --git a/test/files/neg/t10097.check b/test/files/neg/t10097.check index dc81bae0fa..1f70546b57 100644 --- a/test/files/neg/t10097.check +++ b/test/files/neg/t10097.check @@ -1,9 +1,9 @@ t10097.scala:2: error: case classes must have a non-implicit parameter list; try 'case class C()(...)' case class C(implicit val c: Int) - ^ + ^ t10097.scala:4: error: case classes must have a non-implicit parameter list; try 'case class D()(...)(...)' case class D(implicit c: Int)(s: String) - ^ + ^ t10097.scala:4: error: an implicit parameter section must be last case class D(implicit c: Int)(s: String) ^ diff --git a/test/files/neg/t10097.flags b/test/files/neg/t10097.flags new file mode 100644 index 0000000000..714bbf5125 --- /dev/null +++ b/test/files/neg/t10097.flags @@ -0,0 +1 @@ +-Xsource:2.13 diff --git a/test/files/neg/t10097b.check b/test/files/neg/t10097b.check new file mode 100644 index 0000000000..14535fee34 --- /dev/null +++ b/test/files/neg/t10097b.check @@ -0,0 +1,6 @@ +t10097b.scala:2: warning: case classes should have a non-implicit parameter list; adapting to 'case class C()(...)' +case class C(implicit val c: Int) + ^ +error: No warnings can be incurred under -Xfatal-warnings. +one warning found +one error found diff --git a/test/files/neg/t10097b.flags b/test/files/neg/t10097b.flags new file mode 100644 index 0000000000..c6bfaf1f64 --- /dev/null +++ b/test/files/neg/t10097b.flags @@ -0,0 +1 @@ +-deprecation -Xfatal-warnings diff --git a/test/files/neg/t10097b.scala b/test/files/neg/t10097b.scala new file mode 100644 index 0000000000..f166db6792 --- /dev/null +++ b/test/files/neg/t10097b.scala @@ -0,0 +1,3 @@ + +case class C(implicit val c: Int) + 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) +} |