diff options
Diffstat (limited to 'examples/dotty-example')
-rw-r--r-- | examples/dotty-example/README.md | 3 | ||||
-rw-r--r-- | examples/dotty-example/build/build.scala | 2 | ||||
-rw-r--r-- | examples/dotty-example/src/Main.scala | 7 |
3 files changed, 12 insertions, 0 deletions
diff --git a/examples/dotty-example/README.md b/examples/dotty-example/README.md new file mode 100644 index 0000000..bc0f6b0 --- /dev/null +++ b/examples/dotty-example/README.md @@ -0,0 +1,3 @@ +Dotty example project compiling hello world with the next version of Scala. + +All you need to do to enable Dotty is `extends Dotty` in your build.scala . diff --git a/examples/dotty-example/build/build.scala b/examples/dotty-example/build/build.scala new file mode 100644 index 0000000..eb67d93 --- /dev/null +++ b/examples/dotty-example/build/build.scala @@ -0,0 +1,2 @@ +import cbt._ +class Build(val context: Context) extends Dotty diff --git a/examples/dotty-example/src/Main.scala b/examples/dotty-example/src/Main.scala new file mode 100644 index 0000000..411527a --- /dev/null +++ b/examples/dotty-example/src/Main.scala @@ -0,0 +1,7 @@ +object Main extends Foo("Hello Dotty - trait parameters, yay"){ + def main(args: Array[String]) = { + println(hello) + } +} + +trait Foo(val hello: String) |