summaryrefslogblamecommitdiff
path: root/test/files/run/t5356.scala
blob: f7696c60883ef85b8c439347d354c437513a88c7 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                            
object Test {
  def f(x: { def toInt: Int }) = println(x.toInt + " " + x.getClass.getName)
  
  def main(args: Array[String]): Unit = {
    f(1)
    f(1.toInt)
    f(BigInt(1))
    f(1d)
    f(1f)
    println((1: { def toInt: Int }).toInt)
  }
}