summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJosh Suereth <Joshua.Suereth@gmail.com>2012-08-30 04:44:25 -0700
committerJosh Suereth <Joshua.Suereth@gmail.com>2012-08-30 04:44:25 -0700
commit415639fbf6b7f1a9366e970a8850a0d735dc7a14 (patch)
tree0ddf534a466bebc80047b0eb140a3d4e5b1ff91c /test
parent778edaaf7bec83a28ec669521d6d679a005f1040 (diff)
parent7b6da97d683fd7ff2e3f7340e9138e615aed763a (diff)
downloadscala-415639fbf6b7f1a9366e970a8850a0d735dc7a14.tar.gz
scala-415639fbf6b7f1a9366e970a8850a0d735dc7a14.tar.bz2
scala-415639fbf6b7f1a9366e970a8850a0d735dc7a14.zip
Merge pull request #1209 from odersky/ticket/6227
Closes SI-6227
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/t6227.check4
-rw-r--r--test/files/neg/t6227.scala6
-rw-r--r--test/files/pos/t5667.scala2
3 files changed, 10 insertions, 2 deletions
diff --git a/test/files/neg/t6227.check b/test/files/neg/t6227.check
new file mode 100644
index 0000000000..5e3c636712
--- /dev/null
+++ b/test/files/neg/t6227.check
@@ -0,0 +1,4 @@
+t6227.scala:2: error: illegal combination of modifiers: implicit and case for: class IntOps
+ implicit case class IntOps( i: Int ) {
+ ^
+one error found
diff --git a/test/files/neg/t6227.scala b/test/files/neg/t6227.scala
new file mode 100644
index 0000000000..46416839d1
--- /dev/null
+++ b/test/files/neg/t6227.scala
@@ -0,0 +1,6 @@
+object Test {
+ implicit case class IntOps( i: Int ) {
+ def twice = i * 2
+ }
+}
+
diff --git a/test/files/pos/t5667.scala b/test/files/pos/t5667.scala
index 513de5b663..353eec93d6 100644
--- a/test/files/pos/t5667.scala
+++ b/test/files/pos/t5667.scala
@@ -1,6 +1,4 @@
object Main {
implicit class C(val s: String) extends AnyVal
implicit class C2(val s: String) extends AnyRef
-
- implicit case class Foo(i: Int)
}