aboutsummaryrefslogtreecommitdiff
path: root/tests/new
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-11-03 14:04:45 +0100
committerMartin Odersky <odersky@gmail.com>2015-11-03 14:04:45 +0100
commitd2ed587d8711bcbeaaf970043e7d80955ada164a (patch)
treea98c22088a14e9c7ea7e7a718724dfe20ad7ddad /tests/new
parentf2187f3deb90b3584a4e7f3030b1d3b716cac775 (diff)
downloaddotty-d2ed587d8711bcbeaaf970043e7d80955ada164a.tar.gz
dotty-d2ed587d8711bcbeaaf970043e7d80955ada164a.tar.bz2
dotty-d2ed587d8711bcbeaaf970043e7d80955ada164a.zip
Enable <:< implicits as conversions.
These were disabled before, which means that having evidence of S <:< T did not introduce a usable implicit conversion from S to T. We do do it like scalac: just disable Predef.$conforms. This makes TraversableOnce compile. Fixes #914.
Diffstat (limited to 'tests/new')
-rw-r--r--tests/new/conforms.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/new/conforms.scala b/tests/new/conforms.scala
new file mode 100644
index 000000000..f07488d28
--- /dev/null
+++ b/tests/new/conforms.scala
@@ -0,0 +1,3 @@
+object Test {
+ def f[A, B](x: A)(implicit e: <:<[A, B]): B = x
+}