summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/t6455.check4
-rw-r--r--test/files/neg/t6455.flags1
-rw-r--r--test/files/neg/t6455.scala6
-rw-r--r--test/files/scalacheck/quasiquotes/TypecheckedProps.scala2
4 files changed, 12 insertions, 1 deletions
diff --git a/test/files/neg/t6455.check b/test/files/neg/t6455.check
new file mode 100644
index 0000000000..8f2aad0b9e
--- /dev/null
+++ b/test/files/neg/t6455.check
@@ -0,0 +1,4 @@
+t6455.scala:5: error: value withFilter is not a member of object O
+ O.withFilter(f => true)
+ ^
+one error found
diff --git a/test/files/neg/t6455.flags b/test/files/neg/t6455.flags
new file mode 100644
index 0000000000..112fc720a0
--- /dev/null
+++ b/test/files/neg/t6455.flags
@@ -0,0 +1 @@
+-Xfuture \ No newline at end of file
diff --git a/test/files/neg/t6455.scala b/test/files/neg/t6455.scala
new file mode 100644
index 0000000000..ebbb37f1cd
--- /dev/null
+++ b/test/files/neg/t6455.scala
@@ -0,0 +1,6 @@
+object O { def filter(p: Int => Boolean): O.type = this }
+
+class Test {
+ // should not compile because we no longer rewrite withFilter => filter under -Xfuture
+ O.withFilter(f => true)
+} \ No newline at end of file
diff --git a/test/files/scalacheck/quasiquotes/TypecheckedProps.scala b/test/files/scalacheck/quasiquotes/TypecheckedProps.scala
index 432c0959c9..7c4cb0306e 100644
--- a/test/files/scalacheck/quasiquotes/TypecheckedProps.scala
+++ b/test/files/scalacheck/quasiquotes/TypecheckedProps.scala
@@ -44,7 +44,7 @@ object TypecheckedProps extends QuasiquoteProperties("typechecked") {
val enums = fq"foo <- new Foo" :: fq"if foo != null" :: Nil
val body = q"foo"
val q"$_; for(..$enums1) yield $body1" = typecheck(q"""
- class Foo { def map(f: Any => Any) = this; def filter(cond: Any => Boolean) = this }
+ class Foo { def map(f: Any => Any) = this; def withFilter(cond: Any => Boolean) = this }
for(..$enums) yield $body
""")
assert(enums1 ≈ enums)