diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-15 15:39:57 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:12:28 +0200 |
commit | 5a46d19dde76b739f6672c9b6f57355cfd38159a (patch) | |
tree | 57dc454cad17be45e71e9180bb283c7cd606920e /tests/run/inlineForeach.scala | |
parent | c9fa504161cc34ec979ae3c1b73db6798adc4872 (diff) | |
download | dotty-5a46d19dde76b739f6672c9b6f57355cfd38159a.tar.gz dotty-5a46d19dde76b739f6672c9b6f57355cfd38159a.tar.bz2 dotty-5a46d19dde76b739f6672c9b6f57355cfd38159a.zip |
Handle inlining in inlining arguments
We got unbound symbols before because
a TreeTypeMap would copy a tree of an inline
DefDef but would not adapt the inline body
stored in the @inline annotation of the DefDef
to point to the updated tree.
Diffstat (limited to 'tests/run/inlineForeach.scala')
-rw-r--r-- | tests/run/inlineForeach.scala | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/run/inlineForeach.scala b/tests/run/inlineForeach.scala index 0c6135c6d..1389ad6c4 100644 --- a/tests/run/inlineForeach.scala +++ b/tests/run/inlineForeach.scala @@ -17,7 +17,7 @@ object Test { implicit class intWrapper(private val start: Int) extends AnyVal { def until(end: Int) = new Range(start, end) def to(limit: Int) = new Range(start, limit + 1) - }/* + } def matmul(xs: Array[Array[Double]], ys: Array[Array[Double]]): Array[Array[Double]] = { def nrows = xs.length @@ -34,11 +34,15 @@ object Test { } zs } -*/ + def main(args: Array[String]) = { - /* 1.until(10).foreach(i => println(i)) - 1.until(10).foreach(println(_))*/ + 1.until(10).foreach(i => println(i)) + 1.until(10).foreach(println(_)) 1.until(10).foreach(println) for (i <- 1 to 10) println(i) + + for (k1 <- 1 to 10) + for (k2 <- 1 to 10) + println(s"$k1") } } |