summaryrefslogtreecommitdiff
path: root/test/junit
diff options
context:
space:
mode:
authorwpopielarski <wpopielarski@gmail.com>2015-10-21 16:58:20 +0200
committerwpopielarski <wpopielarski@gmail.com>2015-11-04 10:31:46 +0100
commit153c70b5b64344db5a97a3de23e91e49f57ac337 (patch)
tree81d06ebbcdff3f6104f2fb7b2a339e4b09c452d4 /test/junit
parenta24ca7fa617cabada82c43d2d6ac354db698d181 (diff)
downloadscala-153c70b5b64344db5a97a3de23e91e49f57ac337.tar.gz
scala-153c70b5b64344db5a97a3de23e91e49f57ac337.tar.bz2
scala-153c70b5b64344db5a97a3de23e91e49f57ac337.zip
Multi output problem with delambdafied compilation
User code compilation with -Ybackend:GenBCode -Ydelambdafy:method fails for projects with multiple output directories. The problem has its root in a fact that some `lambdaClass` symbols the `associatedFile` field is not set. It can be done in Delambdafy.scala (`makeAnonymousClass` method) and is working for following lambda examples: {{{ package acme object Delambdafy { type -->[D, I] = PartialFunction[D, I] def main(args: Array[String]): Unit = { val result = List(1, 2, 4).map { a => val list = List("1", "2", "3").map { _ + "test" } list.find { _ == a.toString + "test" } } lazy val _foo = foo(result) { case x::xs if x isDefined => x.get.length case _ => 0 } lazy val bar: Int => Int = { case 2 => 13 case _ => val v = List(1).map(_ + 42).head v + 1 } } def foo(b: List[Option[String]])(a: List[Option[String]] => Int): Int = a(b) } }}} but is NOT working for following lambda: {{{ package acme object Delambdafy { type -->[D, I] = PartialFunction[D, I] def main(args: Array[String]): Unit = { lazy val _baz = baz { case 1 => val local = List(1).map(_ + 1) local.head } } def baz[T](f: Any --> Any): Any => Any = f } }}} so that's why source of compilation unit is used to determine output directory in case when source file is not found for symbol.
Diffstat (limited to 'test/junit')
0 files changed, 0 insertions, 0 deletions