aboutsummaryrefslogtreecommitdiff
path: root/examples/dotty-example
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-09-26 19:57:44 +0000
committerChristopher Vogt <oss.nsp@cvogt.org>2016-09-26 22:57:40 -0400
commitdd96e989d81180d4bbb8b30846a53c8239dfe3ac (patch)
tree3430078bd2e9fb2944c27eb87ae3fd53a5eb8937 /examples/dotty-example
parentd23dd6040fdba7b201e5f15d7027030d5259ef8e (diff)
downloadcbt-dd96e989d81180d4bbb8b30846a53c8239dfe3ac.tar.gz
cbt-dd96e989d81180d4bbb8b30846a53c8239dfe3ac.tar.bz2
cbt-dd96e989d81180d4bbb8b30846a53c8239dfe3ac.zip
Dotty plugin and example project.
Diffstat (limited to 'examples/dotty-example')
-rw-r--r--examples/dotty-example/README.md3
-rw-r--r--examples/dotty-example/build/build.scala2
-rw-r--r--examples/dotty-example/src/Main.scala7
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)