aboutsummaryrefslogtreecommitdiff
path: root/sandbox/scalajs/src
diff options
context:
space:
mode:
authorLucas Burson <ljdelight@gmail.com>2016-10-16 20:29:12 -0500
committerLucas Burson <ljdelight@gmail.com>2016-10-16 20:29:12 -0500
commit16eab024a892a1fe20750284625990b9afcbaadb (patch)
tree9c2aa306f162773e97fee3370cb72bb131e94278 /sandbox/scalajs/src
parent0fdd4e37ffca9b1da770ba348aece793c200f1ff (diff)
downloaddotty-16eab024a892a1fe20750284625990b9afcbaadb.tar.gz
dotty-16eab024a892a1fe20750284625990b9afcbaadb.tar.bz2
dotty-16eab024a892a1fe20750284625990b9afcbaadb.zip
Move 'sandbox/scalajs/hello.scala' to 'sandbox/scalajs/src/main/scala/hello.scala' to fix an ensime error. After this change, `sbt ensimeConfig` works.
The ensime error message: ``` [error] You have .scala files in the base of your project. Such "script style" projects [error] are not supported by ENSIME. Simply move them into src/main/scala to get support. [error] Please read https://github.com/ensime/ensime-server/issues/1432 ```
Diffstat (limited to 'sandbox/scalajs/src')
-rw-r--r--sandbox/scalajs/src/main/scala/hello.scala15
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))
+ }
+}