diff options
Diffstat (limited to 'examples/dotty-example/src')
-rw-r--r-- | examples/dotty-example/src/Main.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/dotty-example/src/Main.scala b/examples/dotty-example/src/Main.scala new file mode 100644 index 0000000..1963b51 --- /dev/null +++ b/examples/dotty-example/src/Main.scala @@ -0,0 +1,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) |