aboutsummaryrefslogtreecommitdiff
path: root/examples/dotty-example/src/Main.scala
blob: fdc2068434349048cd2d51da0941e0c16ce4d81e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
package dotty_example
object Main extends Foo("Hello Dotty - trait parameters, yay"){
  def main(args: Array[String]): Unit = {
    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)