summaryrefslogtreecommitdiff
path: root/scalalib/test/resources
diff options
context:
space:
mode:
authorGuillaume R <theelectronwill@gmail.com>2019-07-25 01:14:09 +0200
committerLi Haoyi <haoyi.sg@gmail.com>2019-07-25 07:14:09 +0800
commit4e3bcc9eeb8e3b6b13f29cb63360a512c0f6ed9b (patch)
tree0a985d7bd97c66582c93b3e8d6989c91329cb8f6 /scalalib/test/resources
parent1f0d223c1de438071645c7788174fb708ca55043 (diff)
downloadmill-4e3bcc9eeb8e3b6b13f29cb63360a512c0f6ed9b.tar.gz
mill-4e3bcc9eeb8e3b6b13f29cb63360a512c0f6ed9b.tar.bz2
mill-4e3bcc9eeb8e3b6b13f29cb63360a512c0f6ed9b.zip
Use the binary version of the compiler bridge when available (#659)
* Use the binary version of the compiler bridge when available, fix #591 This also eliminates #389 for Dotty 0.13.0-RC1 and more recent * Add test for Dotty 0.16
Diffstat (limited to 'scalalib/test/resources')
-rw-r--r--scalalib/test/resources/hello-dotty/boo/src/Main.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/scalalib/test/resources/hello-dotty/boo/src/Main.scala b/scalalib/test/resources/hello-dotty/boo/src/Main.scala
new file mode 100644
index 00000000..6b19f294
--- /dev/null
+++ b/scalalib/test/resources/hello-dotty/boo/src/Main.scala
@@ -0,0 +1,17 @@
+import cats._, cats.data._, cats.implicits._
+
+trait Context
+
+object Main {
+ def foo(f: given Int => Int): Int = {
+ given x as Int = 1
+ f
+ }
+
+ def main(args: Array[String]): Unit = {
+ val x = Applicative[List].pure(1)
+ assert(x == List(1))
+ val value = foo(given x => x + 1)
+ assert(value == 2)
+ }
+}