summaryrefslogtreecommitdiff
path: root/test/pending
diff options
context:
space:
mode:
authorSimon Ochsenreither <simon@ochsenreither.de>2013-08-20 18:19:33 +0200
committerSimon Ochsenreither <simon@ochsenreither.de>2013-09-25 15:16:12 +0200
commit96ff8c5d0b49a0c6c7353c57abe9bc10e6aed70f (patch)
treecd55b66d53c99df3af445366bd86faed7e6adfae /test/pending
parentbda48577d022811be58ce2b7f9e46890543ad45b (diff)
downloadscala-96ff8c5d0b49a0c6c7353c57abe9bc10e6aed70f.tar.gz
scala-96ff8c5d0b49a0c6c7353c57abe9bc10e6aed70f.tar.bz2
scala-96ff8c5d0b49a0c6c7353c57abe9bc10e6aed70f.zip
SI-7629 Deprecate view bounds
This introduces a warning(/error with -Xfuture) with a general migration advice. The IDE can use the warning to offer a quick fix with the specific refactoring necessary.
Diffstat (limited to 'test/pending')
-rw-r--r--test/pending/t7629-view-bounds-removal.check9
-rw-r--r--test/pending/t7629-view-bounds-removal.flags1
-rw-r--r--test/pending/t7629-view-bounds-removal.scala4
3 files changed, 14 insertions, 0 deletions
diff --git a/test/pending/t7629-view-bounds-removal.check b/test/pending/t7629-view-bounds-removal.check
new file mode 100644
index 0000000000..dc52105eaf
--- /dev/null
+++ b/test/pending/t7629-view-bounds-removal.check
@@ -0,0 +1,9 @@
+t7629-view-bounds-removal.scala:2: error: View bounds have been removed. Use an implicit parameter instead.
+Example: Instead of `def f[A <% Int](a: A)` use `def f[A](a: A)(implicit ev: A => Int)`.
+ def f[A <% Int](a: A) = null
+ ^
+t7629-view-bounds-removal.scala:3: error: View bounds have been removed. Use an implicit parameter instead.
+Example: Instead of `def f[A <% Int](a: A)` use `def f[A](a: A)(implicit ev: A => Int)`.
+ def g[C, B <: C, A <% B : Numeric](a: A) = null
+ ^
+two errors found
diff --git a/test/pending/t7629-view-bounds-removal.flags b/test/pending/t7629-view-bounds-removal.flags
new file mode 100644
index 0000000000..29f4ede37a
--- /dev/null
+++ b/test/pending/t7629-view-bounds-removal.flags
@@ -0,0 +1 @@
+-Xfuture
diff --git a/test/pending/t7629-view-bounds-removal.scala b/test/pending/t7629-view-bounds-removal.scala
new file mode 100644
index 0000000000..a6ede1fcc3
--- /dev/null
+++ b/test/pending/t7629-view-bounds-removal.scala
@@ -0,0 +1,4 @@
+object Test {
+ def f[A <% Int](a: A) = null
+ def g[C, B <: C, A <% B : Numeric](a: A) = null
+}