aboutsummaryrefslogtreecommitdiff
path: root/tests/disabled/macro/run/macro-sip19-revised/Test_2.scala
blob: 483665ae4fa2043f45b149fe4eb1b28fb058a3f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import Macros._

object Test extends dotty.runtime.LegacyApp {
  def foo(x: Int, y: Int)(implicit loc: SourceLocation): Int = {
    println("hey, i've been called from %s".format(loc))
    if (x < y) foo(y, x)
    else if (y == 0) x
    else foo(x - y, y)
  }

  println(foo(4, 2))
}