diff options
Diffstat (limited to 'sandbox/scalajs/src/main')
-rw-r--r-- | sandbox/scalajs/src/main/scala/hello.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sandbox/scalajs/src/main/scala/hello.scala b/sandbox/scalajs/src/main/scala/hello.scala new file mode 100644 index 000000000..bd4aa8cc5 --- /dev/null +++ b/sandbox/scalajs/src/main/scala/hello.scala @@ -0,0 +1,15 @@ +package hello + +import scala.scalajs.js + +trait MyTrait { + val x = 5 + def foo(y: Int) = x +} + +object world extends js.JSApp with MyTrait { + def main(): Unit = { + println("hello dotty.js!") + println(foo(4)) + } +} |