aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/t5274_1.scala
blob: bc0ba99e45a1795bb6005b2cffc77dd2107e23f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import scala.reflect.runtime.universe._
import scala.tools.reflect.Eval

object Test extends dotty.runtime.LegacyApp {
  reify {
    def factorial(n: BigInt): BigInt =
      if (n == 0) 1 else n * factorial(n-1)

    val f50 = factorial(50); val f49 = factorial(49)
    println("50! = " + f50)
    println("49! = " + f49)
    println("50!/49! = " + (f50 / f49))
  }.eval
}