aboutsummaryrefslogtreecommitdiff
path: root/examples/dotty-example/src/Main.scala
blob: 1963b51aa7fabe20184aa135235896bdc18937a0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
object Main extends Foo("Hello Dotty - trait parameters, yay"){
  def main(args: Array[String]) = {  
    println(hello)

    // Sanity check the classpath: this won't run if the dotty jar is not present.
    val x: Int => Int = z => z
    x(1)
  }
}

trait Foo(val hello: String)