aboutsummaryrefslogtreecommitdiff
path: root/examples/dotty-example/src/Main.scala
diff options
context:
space:
mode:
authorJan Christopher Vogt <oss.nsp@cvogt.org>2016-09-28 21:29:26 -0400
committerGitHub <noreply@github.com>2016-09-28 21:29:26 -0400
commit9d3c9e9087a6dc0a4445f9428e02f6e7612470c6 (patch)
treeab1aef0726e71ff1ad760b6574489dc20b2d1950 /examples/dotty-example/src/Main.scala
parentab5ebf2577146b6d8e7c54db4d6bf9ba6230ab57 (diff)
parent9b4b9e0c7a747972229fe9dbabe4b6e546c29f4d (diff)
downloadcbt-9d3c9e9087a6dc0a4445f9428e02f6e7612470c6.tar.gz
cbt-9d3c9e9087a6dc0a4445f9428e02f6e7612470c6.tar.bz2
cbt-9d3c9e9087a6dc0a4445f9428e02f6e7612470c6.zip
Merge pull request #235 from cvogt/dotty
Dotty plugin and example project.
Diffstat (limited to 'examples/dotty-example/src/Main.scala')
-rw-r--r--examples/dotty-example/src/Main.scala11
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)